public class DateType extends TypeSchema
| Modifier and Type | Field and Description |
|---|---|
static SimpleDateFormat |
DATE_FORMATTER
complete date format which could conform with time long value
note that
if we employ this format, we need to extend time gene for supporting millisecond and timezone
|
List<IntParam> |
dateFields
a sequence of fields representing the date
|
IntParam |
day
day field
|
boolean |
EMPLOY_SIMPLE_Format
represent the type employs SimpleDateFormat as [SIMPLE_DATE_FORMATTER]
|
IntParam |
hour
hour field
|
IntParam |
millisecond
millisecond field
|
IntParam |
minute
minute field
|
IntParam |
month
month field
|
IntParam |
second
second field
|
static SimpleDateFormat |
SIMPLE_DATE_FORMATTER
simple date format
current default setting for handling date
|
IntParam |
timezone
time zone field
|
IntParam |
year
year field
|
depth| Constructor and Description |
|---|
DateType()
a java.util.Date with simple format
|
DateType(String type,
String fullTypeName,
Class<?> clazz)
DateType with simpleFormat
|
DateType(String type,
String fullTypeName,
Class<?> clazz,
boolean simpleFormat) |
| Modifier and Type | Method and Description |
|---|---|
List<IntParam> |
getDateFields() |
Date |
getDateInstance(List<IntParam> values) |
long |
getDateLong(List<IntParam> values) |
String |
getDateString(List<IntParam> values) |
TypeDto |
getDto() |
List<IntParam> |
getIntValues(Date date)
extract value of fields based on the date instance
|
copy, getClazz, getFullTypeName, getType, getTypeNameForInstance, sameTypepublic final boolean EMPLOY_SIMPLE_Format
public final IntParam year
public final IntParam month
public final IntParam day
public final IntParam hour
public final IntParam minute
public final IntParam second
public final IntParam millisecond
public final IntParam timezone
public static final SimpleDateFormat SIMPLE_DATE_FORMATTER
public static final SimpleDateFormat DATE_FORMATTER
public DateType(String type, String fullTypeName, Class<?> clazz, boolean simpleFormat)
type - is the type namefullTypeName - is the full type nameclazz - is the class representing the typesimpleFormat - specifies if use simple format as SIMPLE_DATE_FORMATTERpublic DateType(String type, String fullTypeName, Class<?> clazz)
type - is the type namefullTypeName - is the full type nameclazz - is the class representing the typepublic DateType()
public List<IntParam> getDateFields()
public Date getDateInstance(List<IntParam> values)
values - are a list of values for the datepublic String getDateString(List<IntParam> values)
values - are a list of values for the datepublic List<IntParam> getIntValues(Date date)
date - is an instance of Datepublic TypeDto getDto()
getDto in class TypeSchemaCopyright © 2016–2022. All rights reserved.