|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.caleigo.core.DateProxyData
DateProxyData is an IProxyData implementation that can be used to obtain the current time and/or date-data relative to the current time. It can for instance be used as the default value on an entity date field.
Field Summary | |
static int |
NOW
Specifies that the current time at the call to getData should be used with a millisecond resolution. |
static int |
TODAY
Specifies that the current date at the call to getData should be used with all time data (hour or higher resolution) should be set to zero. |
Constructor Summary | |
DateProxyData()
Creates a new instance of DateProxyData with the type NOW. |
|
DateProxyData(int type)
Creates a new instance of DateProxyData with the provided type. |
|
DateProxyData(int type,
int modifierType,
int modifierAmount)
Creates a new instance of DateProxyData with the provided type and the provided modifier data. |
Method Summary | |
static java.lang.Object |
convertToDateObject(java.lang.Object data)
Used to convert an object to a Date Object, either the java.util.Date object or a DateProxyData object. |
java.lang.Object |
getData()
|
DataType |
getDataType()
|
int |
getType()
|
int |
mModifierAmount()
|
int |
mModifierType()
|
static DateProxyData |
parse(java.lang.String typeString)
Parses a string to a DateProxyData instance. wlaid strings are "NOW" or "TODAY" followed by an optional modifier in the format "+/- |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NOW
public static final int TODAY
Constructor Detail |
public DateProxyData()
public DateProxyData(int type)
type
- The type to use NOW or TODAY.public DateProxyData(int type, int modifierType, int modifierAmount)
type
- The type to use NOW or TODAY.modifierType
- The modifier type shoult be Calendar field constant.modifierAmount
- The modifier amount is positive or negative integer.Method Detail |
public static DateProxyData parse(java.lang.String typeString)
typeString
- the String tha tshould be parsed
public static java.lang.Object convertToDateObject(java.lang.Object data)
data
- The data representing a Date
public java.lang.Object getData()
getData
in interface IProxyData
public DataType getDataType()
getDataType
in interface IProxyData
public int getType()
public int mModifierType()
public int mModifierAmount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |