All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.datesbeans.DateEvaluator
java.lang.Object
|
+----com.ibm.datesbeans.FunctionBean
|
+----com.ibm.datesbeans.DateEvaluator
- public class DateEvaluator
- extends FunctionBean
Bean for executing operations with dates and numbers. The following
operations are at present supported:
date - date: DATE_MINUS_DATE operation type,
date + days: DATE_PLUS_DAYS operation type,
date + months: DATE_PLUS_MONTHS operation type,
date + years: DATE_PLUS_YEARS operation type
- Since:
- DatesBeans 1.0
DATE_MINUS_DATE- Usefull constant for operation property (date - date)
DATE_PLUS_DAYS- Usefull constant for operation property (date + days)
DATE_PLUS_MONTHS- Usefull constant for operation property (date + months)
DATE_PLUS_YEARS- Usefull constant for operation property (date + years)
DateEvaluator()
- Construct a DateEvaluator.
getAboutThisBean()
- Returns a special formatted string intended for use by the editor of this property.
getInputFirstArg()
- Gets the first argument in expression.
getInputSecondArg()
- Gets the second argument in expression
getOperation()
- Gets the type of operation (DATE_MINUS_DATE, DATE_PLUS_DAYS, DATE_PLUS_MONTHS, DATE_PLUS_YEARS).
getResultAsDate()
- Gets the current result of calculations as java.util.Date.
getResultAsDays()
- Gets the current result of calculations as int.
setAboutThisBean(String)
- Setter method for the aboutThisBean property to be available in the properties list.
setInputFirstArg(Date)
- Sets the first argument in expression.
setInputSecondArg(Object)
- Sets the second argument in expression.
setOperation(int)
- Sets the type of operation (DATE_MINUS_DATE, DATE_PLUS_DAYS, DATE_PLUS_MONTHS, DATE_PLUS_YEARS).
DATE_MINUS_DATE
public static final int DATE_MINUS_DATE
Usefull constant for operation property (date - date)
DATE_PLUS_DAYS
public static final int DATE_PLUS_DAYS
Usefull constant for operation property (date + days)
DATE_PLUS_MONTHS
public static final int DATE_PLUS_MONTHS
Usefull constant for operation property (date + months)
DATE_PLUS_YEARS
public static final int DATE_PLUS_YEARS
Usefull constant for operation property (date + years)
DateEvaluator
public DateEvaluator()
Construct a DateEvaluator.
getAboutThisBean
public java.lang.String getAboutThisBean()
Returns a special formatted string intended for use by the editor of this property.
- Returns:
- the special formatted string for use by the editor of this property
getInputFirstArg
public java.util.Date getInputFirstArg()
Gets the first argument in expression.
- Returns:
- the first argument in expression
- See Also:
- setInputFirstArg
getInputSecondArg
public java.lang.Object getInputSecondArg()
Gets the second argument in expression
- Returns:
- the second argument in expression
- See Also:
- setInputSecondArg
getOperation
public int getOperation()
Gets the type of operation (DATE_MINUS_DATE, DATE_PLUS_DAYS, DATE_PLUS_MONTHS, DATE_PLUS_YEARS).
- Returns:
- the type of operation
- See Also:
- setOperation
getResultAsDate
public java.util.Date getResultAsDate()
Gets the current result of calculations as java.util.Date.
- Returns:
- the current result of calculations as java.util.Date
getResultAsDays
public int getResultAsDays()
Gets the current result of calculations as int.
- Returns:
- the current result of calculations as int
setAboutThisBean
public void setAboutThisBean(java.lang.String newValue)
Setter method for the aboutThisBean property to be available in the properties list.
This method should not be used to set the aboutThisBean property value.
- Parameters:
newValue
- the special formatted string
setInputFirstArg
public void setInputFirstArg(java.util.Date value)
Sets the first argument in expression.
- Parameters:
value
- new value of first argument in expression.
- See Also:
- getInputFirstArg
setInputSecondArg
public void setInputSecondArg(java.lang.Object value)
Sets the second argument in expression. If the operation - DATE_MINUS_DATE,
then property should be the object of a java.util.Date, differently
java.lang.String or java.lang.Number
- Parameters:
value
- new value of second argument in expression
- See Also:
- getInputSecondArg
setOperation
public void setOperation(int value)
Sets the type of operation (DATE_MINUS_DATE, DATE_PLUS_DAYS, DATE_PLUS_MONTHS, DATE_PLUS_YEARS).
- Parameters:
value
- new value of type of operation
- See Also:
- getOperation
All Packages Class Hierarchy This Package Previous Next Index