|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCrystalValue
com.crystaldecisions.reports.common.value.FormulaValue
com.crystaldecisions.reports.common.value.DateValue
Provides methods for converting native Java types to a format understood by the Crystal Reports Formula Language.
All Java user defined functions must return a FormulaValue object.
| Field Summary | |
static int |
nullCRDate
A null CRDate value. |
| Method Summary | |
DateValue |
addNumberToDate(int n)
Adds n days to the current date.
|
FormulaValue |
coerceToDate()
Internal use only. |
FormulaValue |
coerceToDateTime()
Internal use only. |
int |
compareTo(java.lang.Object obj)
Internal use only. |
int |
compareTo(java.lang.Object obj,
java.util.Comparator stringComparator)
Internal use only. |
boolean |
equals(java.lang.Object obj)
Determines whether the parameter Object is a DateValue object with the same class and value
as this object.
|
static DateValue |
fromCalendar(java.util.Calendar calendar)
Returns a DateValue object that represents the date in the specified Calendar object.
|
static DateValue |
fromCRDate(int CRDate)
Internal use only. |
static DateValue |
fromOleDate(double OleDate)
Internal use only. |
static DateValue |
fromYMD(int year,
int month,
int day)
Returns a DateValue object that represents the specified year, month, and day.
|
int |
getCRDate()
Internal use only. |
static int |
getCRDate(DateValue date)
Internal use only. |
RangeValue |
getDateTimeRangeValue()
Gets a RangeValue object whose range covers this day.
|
int |
getDay()
Gets the day component of this DateValue |
DateTimeValue |
getEndOfDayDateTimeValue()
Gets a DateTimeValue object that represents the end of
this day.
|
int |
getMonth()
Gets the month component of this DateValue |
double |
getOleDate()
Internal use only. |
DateTimeValue |
getStartOfDayDateTimeValue()
Gets a DateTimeValue object that represents the beginning of
this day.
|
ValueType |
getValueType()
Gets the ValueType of this DateValue object.
|
int |
getYear()
Gets the year component of this DateValue |
int |
hashCode()
Returns a hash code for this DateValue object.
|
static boolean |
isValidOleDate(double OleDate)
Internal use only. |
static DateValue |
now()
Returns a DateValue object that represents the current date when the method is called.
|
static double |
To1900Format(DateValue date)
Returns a double that represents the date in the 1900 format system (the number of days since Jan 1, 1900).
|
java.lang.String |
toString()
Returns a String representation of this DateValue object. |
| Methods inherited from class com.crystaldecisions.reports.common.value.FormulaValue |
coerce, coerceToArray, coerceToArray, coerceToBoolean, coerceToBoolean, coerceToCurrency, coerceToCurrency, coerceToDate, coerceToDateTime, coerceToNumber, coerceToNumber, coerceToRange, coerceToRange, coerceToRangeArray, coerceToRangeArray, coerceToString, coerceToString, coerceToTime, coerceToTime, getFormulaValueType, makeZeroValue |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int nullCRDate
A null CRDate value.
| Method Detail |
public static DateValue now()
Returns a DateValue object that represents the current date when the method is called.
public static DateValue fromCRDate(int CRDate)
Internal use only.
public static DateValue fromYMD(int year,
int month,
int day)
Returns a DateValue object that represents the specified year, month, and day.
year - the complete year (for example, 2002)month - 1-based (for example, 1 for January)day - the day of the month
DateValue object that represents the specified year, month, and day
java.lang.IllegalArgumentException - if the specified year, month, and day do not represent a valid datepublic static DateValue fromCalendar(java.util.Calendar calendar)
Returns a DateValue object that represents the date in the specified Calendar object.
calendar - the Calendar object to represent as a DateValue object
DateValue object that represents the date in the specified Calendar objectpublic static DateValue fromOleDate(double OleDate)
Internal use only.
public static boolean isValidOleDate(double OleDate)
Internal use only.
public double getOleDate()
Internal use only.
public static int getCRDate(DateValue date)
Internal use only.
public int getCRDate()
Internal use only.
public int getYear()
Gets the year component of this DateValue object.
int that represents the year component of this DateValue objectpublic int getMonth()
Gets the month component of this DateValue object.
int that represents the month component of this DateValue objectpublic int getDay()
Gets the day component of this DateValue object.
int that represents the day component of this DateValue objectpublic ValueType getValueType()
Gets the ValueType of this DateValue object.
public FormulaValue coerceToDate()
Internal use only.
coerceToDate in class FormulaValuepublic FormulaValue coerceToDateTime()
Internal use only.
coerceToDateTime in class FormulaValuepublic DateTimeValue getStartOfDayDateTimeValue()
Gets a DateTimeValue object that represents the beginning of
this day.
DateTimeValue object that represents the beginning of
this daypublic DateTimeValue getEndOfDayDateTimeValue()
Gets a DateTimeValue object that represents the end of
this day.
DateTimeValue object that represents the end of
this daypublic RangeValue getDateTimeRangeValue()
Gets a RangeValue object whose range covers this day.
RangeValue object whose range covers this daypublic int hashCode()
Returns a hash code for this DateValue object.
public boolean equals(java.lang.Object obj)
Determines whether the parameter Object is a DateValue object with the same class and value
as this object.
obj - the Object to compare this DateValue object to
true if obj has the same class and value is this DateValue object
public int compareTo(java.lang.Object obj,
java.util.Comparator stringComparator)
Internal use only.
public int compareTo(java.lang.Object obj)
Internal use only.
compareTo in interface java.lang.Comparablepublic DateValue addNumberToDate(int n)
Adds n days to the current date.
If n is negative, n days is subtracted from the date
n - the number of days to add to the current date
DateValue object with the updated datepublic java.lang.String toString()
Returns a String representation of this DateValue object. The String is of the form: "d(yyyy-mm-dd)", where:
- yyyy is the year in four digits (for example, 2004)
- mm is the month in two digits (for example, 01 through 12)
- dd is the day of the month in two digits (for example, 01 through 31)
String representation of this DateValue objectpublic static double To1900Format(DateValue date)
Returns a double that represents the date in the 1900 format system (the number of days since Jan 1, 1900).
date - a DateValue object to be represented in 1900 format system
double that represents the date in the 1900 format system
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||