|
||||||||||
| 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.DateTimeValue
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.
| Method Summary | |
DateTimeValue |
addNumberToDateTime(double nDays)
Adds nDays days to the current date and time.
|
FormulaValue |
coerceToDate()
Internal use only. |
FormulaValue |
coerceToDateTime()
Internal use only. |
FormulaValue |
coerceToTime()
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 DateTimeValue object with the same class and value
as this object.
|
static DateTimeValue |
fromCalendar(java.util.Calendar calendar)
Returns a DateTimeValue object that represents the specified calendar parameter.
|
static DateTimeValue |
fromDateAndTimeValues(DateValue dateValue,
TimeValue timeValue)
Returns a DateTimeValue object that represents the specified dateValue and timeValue parameters.
|
static DateTimeValue |
fromDateValue(DateValue dateValue)
Returns a DateTimeValue object that represents the specified dateValue parameter.
|
static DateTimeValue |
fromOleDate(double OleDate)
Internal use only. |
DateValue |
getDateValue()
Gets a DateValue object that represents the date component of this DateTimeValue object.
|
double |
getOleDate()
Internal use only. |
TimeValue |
getTimeValue()
Gets a TimeValue object that represents the time component of this DateTimeValue object.
|
ValueType |
getValueType()
Gets a ValueType object that represents this DateTimeValue object.
|
int |
hashCode()
Returns a hash code for this DateTimeValue object.
|
static DateTimeValue |
Normalize(int crDate,
long timeInNs)
Returns a DateTimeValue object that represents the input in normalized form. |
static DateTimeValue |
now()
Returns a DateTimeValue object that represents the current date and time at the point when the method is called.
|
static double |
To1900Format(DateTimeValue dateTime)
Returns a double that represents the time in the 1900 format system (the number of days since Jan 1, 1900).
|
java.lang.String |
toString()
Returns a String representation of this DateTimeValue 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, getFormulaValueType, makeZeroValue |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static DateTimeValue Normalize(int crDate,
long timeInNs)
Returns a DateTimeValue object that represents the input in normalized form. If the time is greater than a day, then the time is converted
into a time that is less than one day and the number of days in the date is updated accordingly.
crDate - unnormalized date in daystimeInNs - unnormalized time in nanoseconds
DateTimeValue object that represents the input in normalized formpublic static DateTimeValue now()
Returns a DateTimeValue object that represents the current date and time at the point when the method is called.
DateTimeValue object that represents the current date and time
public static DateTimeValue fromDateAndTimeValues(DateValue dateValue,
TimeValue timeValue)
Returns a DateTimeValue object that represents the specified dateValue and timeValue parameters.
dateValue - a DateValue object that specifies the datetimeValue - a TimeValue object that specifies the time
DateTimeValue object that represents the specified date and time, or null if both the dateValue and timeValue parameters are nullpublic static DateTimeValue fromDateValue(DateValue dateValue)
Returns a DateTimeValue object that represents the specified dateValue parameter.
dateValue - a DateValue object that specifies the date
DateTimeValue object that represents the specified date, or null if the dateValue parameter is nullpublic static DateTimeValue fromCalendar(java.util.Calendar calendar)
Returns a DateTimeValue object that represents the specified calendar parameter.
calendar - a Calendar object that specifies the calendar
DateTimeValue object that represents the specified calendarpublic static DateTimeValue fromOleDate(double OleDate)
Internal use only.
public FormulaValue coerceToDate()
Internal use only.
coerceToDate in class FormulaValuepublic FormulaValue coerceToTime()
Internal use only.
coerceToTime in class FormulaValuepublic FormulaValue coerceToDateTime()
Internal use only.
coerceToDateTime in class FormulaValuepublic double getOleDate()
Internal use only.
public DateValue getDateValue()
Gets a DateValue object that represents the date component of this DateTimeValue object.
DateValue object that represents the date component of this DateTimeValue objectpublic TimeValue getTimeValue()
Gets a TimeValue object that represents the time component of this DateTimeValue object.
TimeValue object that represents the time component of this DateTimeValue objectpublic ValueType getValueType()
Gets a ValueType object that represents this DateTimeValue object.
public int hashCode()
Returns a hash code for this DateTimeValue object.
int that is a hash code for this DateTimeValue objectpublic boolean equals(java.lang.Object obj)
Determines whether the parameter Object is a DateTimeValue object with the same class and value
as this object.
obj - the Object to compare this DateTimeValue object to
true if obj has the same class and value is this DateTimeValue 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 DateTimeValue addNumberToDateTime(double nDays)
Adds nDays days to the current date and time.
nDays can also represent fractional days (for example, 2 minutes, 4 hours, 3 days and 2 hours)
If nDays is negative, nDays days is subtracted from the date
nDays - the number of days (or fractional days) to add (or subtracts)
DateTimeValue object with the updated date and timepublic java.lang.String toString()
Returns a String representation of this DateTimeValue object. The String is of the form: "dt([date][time])",
where [date] is the String representation for a DateTimeValue object and [time] is the String representation for a TimeValue object.
String representation of this DateTimeValue objectpublic static double To1900Format(DateTimeValue dateTime)
Returns a double that represents the time in the 1900 format system (the number of days since Jan 1, 1900).
dateTime - a DateTimeValue object to be represented in 1900 format system
double that represents the time in the 1900 format system
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||