|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DataType
biz.c24.io.api.data.SimpleDataType
biz.c24.io.api.data.AtomicDataType
biz.c24.io.api.data.DateDataType
biz.c24.io.api.data.GenericDateDataType
public class GenericDateDataType
A simple data type representing a Date.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class biz.c24.io.api.data.AtomicDataType |
---|
AtomicDataType.FinalEnum |
Field Summary | |
---|---|
protected static Calendar |
CALENDAR
Calendar instance (shared) to be used for date/time calculation with time zones. |
protected static TimeZone |
TIME_ZONE_UTC
UTC time zone instance. |
Fields inherited from class biz.c24.io.api.data.DataType |
---|
duringParsing, hasEnumerations, hasPatternMatching, qualifierValidation |
Constructor Summary | |
---|---|
GenericDateDataType()
Create a new instance. |
Method Summary | |
---|---|
Format |
createFormat(int idx)
Returns the format with specified index. |
Object |
createObject(Date value)
Creates and returns a new date with the specified value. |
Object |
createObject(long value)
Creates and returns a new date with the specified value. |
Object |
createObject(long value,
TimeZone timeZone)
Creates and returns a new date with the specified value. |
String |
formatObjectOverride(Object obj)
|
String[] |
getAllFormatPatterns()
Returns the format pattern(s). |
DateFormat[] |
getAllFormats()
Deprecated. Use the formatCount and format[index] instead. |
DateStyleEnum |
getDateStyle()
Returns the date style to use when localised. |
DateFormat |
getFormat()
Deprecated. Use the { format[index] instead. |
DateFormat |
getFormat(int idx)
Returns the format object with specified index. |
String |
getFormatPattern()
Returns the main format pattern. |
int |
getFormatsCount()
Returns the defined formats count or 0 if there is no any. |
static DataType |
getInstance()
Returns a singleton instance. |
Object |
getMaxExclusive()
Returns the maximum exclusive value (optional operation). |
Object |
getMaxInclusive()
Returns the maximum inclusive value (optional operation). |
int |
getMaxSize()
Returns the maximum allowable size of the value. |
Object |
getMinExclusive()
Returns the minimum exclusive value (optional operation). |
Object |
getMinInclusive()
Returns the minimum inclusive value (optional operation). |
DatePatternInstanceEnum |
getPatternInstance()
Returns the pattern instance to use when localised. |
DateStyleEnum |
getTimeStyle()
Returns the time style to use when localised. |
TimeZone |
getTimeZone()
Returns the time zone. |
String |
getTwoDigitYearStart()
Returns the start date after which two digit years should be parsed. |
Class |
getValidObjectClass()
Returns the class of valid objects of this type. |
boolean |
isDate()
Returns whether this type allows date components (e.g. yyyy-MM-dd). |
boolean |
isISO8601Based()
|
boolean |
isLenient()
Returns whether the date format is lenient. |
boolean |
isTime()
Returns whether this type allows time components (e.g. |
Object |
parseObject(String str,
ParsePosition pp)
|
Object |
parseObject(String str,
ParsePosition pp,
String datePattern)
Parses the supplied str into an object. |
void |
setAllFormatPatterns(String[] formatPattern)
Sets the format pattern(s). |
void |
setDateStyle(DateStyleEnum dateStyle)
Sets the date style to use when localised. |
void |
setFormatPattern(String formatPattern)
Sets the main format pattern. |
void |
setLenient(boolean lenient)
Sets whether the date format is lenient. |
void |
setMaxExclusive(Object maxExclusive)
Sets the maximum exclusive value (optional operation). |
void |
setMaxInclusive(Object maxInclusive)
Sets the maximum inclusive value (optional operation). |
void |
setMinExclusive(Object minExclusive)
Sets the minimum exclusive value (optional operation). |
void |
setMinInclusive(Object minInclusive)
Sets the minimum inclusive value (optional operation). |
void |
setPatternInstance(DatePatternInstanceEnum patternInstance)
Sets the pattern instance to use when localised. |
void |
setTimeStyle(DateStyleEnum timeStyle)
Sets the time style to use when localised. |
void |
setTimeZone(TimeZone timeZone)
Sets the time zone. |
void |
setTwoDigitYearStart(String twoDigitYearStart)
Sets the start date after which two digit years should be parsed. |
Methods inherited from class biz.c24.io.api.data.DateDataType |
---|
getMinSize |
Methods inherited from class biz.c24.io.api.data.AtomicDataType |
---|
formatObject, getFinal, getLocale, getPad, getPadAmount, getPadJustification, getWhiteSpace, parseObject, setFinal, setLocale, setPad, setPadAmount, setPadJustification, setWhiteSpace |
Methods inherited from class biz.c24.io.api.data.SimpleDataType |
---|
formatObject, formatObjectExternal, isComplex, isSimple, isSizeFixed, parseObject, parseObjectExternal, validateProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final Calendar CALENDAR
protected static final TimeZone TIME_ZONE_UTC
Constructor Detail |
---|
public GenericDateDataType()
Method Detail |
---|
public static DataType getInstance()
public boolean isDate()
DateDataType
isDate
in class DateDataType
public boolean isTime()
DateDataType
isTime
in class DateDataType
public Object createObject(Date value)
DateDataType
createObject
in class DateDataType
value
- The value.
public Object createObject(long value)
DateDataType
createObject
in class DateDataType
value
- The value.
public Object createObject(long value, TimeZone timeZone)
DateDataType
createObject
in class DateDataType
value
- The value.timeZone
- The time zone.
public Class getValidObjectClass()
DataType
getValidObjectClass
in class DateDataType
public final boolean isISO8601Based()
isISO8601Based
in class DateDataType
public DateFormat getFormat()
format[index]
instead.
public int getFormatsCount()
getFormatsCount
in interface FormatableDataType
public DateFormat getFormat(int idx)
idx
- The index of requested format.
public DateFormat[] getAllFormats()
formatCount
and format[index]
instead.
public String getFormatPattern()
public String[] getAllFormatPatterns()
null
if no patterns have been
specified.
public void setFormatPattern(String formatPattern)
formatPattern
- The format pattern.public void setAllFormatPatterns(String[] formatPattern)
formatPattern
- The valid format pattern(s).public DatePatternInstanceEnum getPatternInstance()
public void setPatternInstance(DatePatternInstanceEnum patternInstance)
patternInstance
- The instance.public DateStyleEnum getDateStyle()
public void setDateStyle(DateStyleEnum dateStyle)
dateStyle
- The date style.public DateStyleEnum getTimeStyle()
public void setTimeStyle(DateStyleEnum timeStyle)
timeStyle
- The time style.public boolean isLenient()
public void setLenient(boolean lenient)
lenient
- The lenient valuepublic String getTwoDigitYearStart()
public void setTwoDigitYearStart(String twoDigitYearStart)
twoDigitYearStart
- The new value.public TimeZone getTimeZone()
public void setTimeZone(TimeZone timeZone)
timeZone
- The time zone.public Object getMaxInclusive()
SimpleDataType
getMaxInclusive
in class SimpleDataType
public void setMaxInclusive(Object maxInclusive)
SimpleDataType
setMaxInclusive
in class SimpleDataType
maxInclusive
- The maximum inclusive value.public Object getMinInclusive()
SimpleDataType
getMinInclusive
in class SimpleDataType
public void setMinInclusive(Object minInclusive)
SimpleDataType
setMinInclusive
in class SimpleDataType
minInclusive
- The minimum inclusive value.public Object getMaxExclusive()
SimpleDataType
getMaxExclusive
in class SimpleDataType
public void setMaxExclusive(Object maxExclusive)
SimpleDataType
setMaxExclusive
in class SimpleDataType
maxExclusive
- The maximum exclusive value.public Object getMinExclusive()
SimpleDataType
getMinExclusive
in class SimpleDataType
public void setMinExclusive(Object minExclusive)
SimpleDataType
setMinExclusive
in class SimpleDataType
minExclusive
- The minimum exclusive value.public Format createFormat(int idx)
FormatableDataType
createFormat
in interface FormatableDataType
idx
- The index of requested format.
public int getMaxSize()
SimpleDataType
getMaxSize
in class DateDataType
-1
if the size is unbounded.public Object parseObject(String str, ParsePosition pp)
public Object parseObject(String str, ParsePosition pp, String datePattern)
str
into an object.
str
- The string to be parsed.pp
- The index at which parsing should start and, on the methods return, either the index at which parsing
finished or the index at which an error occurred.
public String formatObjectOverride(Object obj)
formatObjectOverride
in class AtomicDataType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |