org.kuali.kfs.module.ar.document.validation.impl
Class CustomerInvoiceDueDateValidation
java.lang.Object
org.kuali.kfs.sys.document.validation.ParameterizedValidation
org.kuali.kfs.sys.document.validation.GenericValidation
org.kuali.kfs.module.ar.document.validation.impl.CustomerInvoiceDueDateValidation
- All Implemented Interfaces:
- Validation
public class CustomerInvoiceDueDateValidation
- extends GenericValidation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomerInvoiceDueDateValidation
public CustomerInvoiceDueDateValidation()
validate
public boolean validate(AttributedDocumentEvent event)
- Description copied from interface:
Validation
- This method validates that certain parameters
- Returns:
- true if validation should continue, false otherwise
getDifferenceInDays
public static long getDifferenceInDays(Timestamp t1,
Timestamp t2)
- This method calculates the difference in days between the two timestamps provided.
This method is used instead of DateUtils.getDifferenceInDays() because there is a rounding issue within the timestamp that exists which must be dealt with to
prevent improper calculations. This issue is similar to the problems that exist with adding and subtracting doubles and the inherently bad way that Java handles
numbers.
The approach used within DateUtils does not offer enough accuracy to calculate the difference consistently and accurately.
- Parameters:
t1
- t2
-
- Returns:
- The difference in days between the two given timestamps.
getCustomerInvoiceDocument
public CustomerInvoiceDocument getCustomerInvoiceDocument()
setCustomerInvoiceDocument
public void setCustomerInvoiceDocument(CustomerInvoiceDocument customerInvoiceDocument)
getDateTimeService
public org.kuali.rice.kns.service.DateTimeService getDateTimeService()
setDateTimeService
public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
getParameterService
public org.kuali.rice.kns.service.ParameterService getParameterService()
setParameterService
public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.