|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.domain.Domain | +--org.arch4j.domain.DateTimeDomain
Represents a datetime value and provides convenience methods to set and
retrieve the value in String
format.
Field Summary | |
static String |
COMMON_DATE_FORMAT
Constant defining the common date format. |
static String |
COMMON_DATETIME_FORMAT
Constant defining the common datetime format. |
Constructor Summary | |
DateTimeDomain()
Default constructor. |
|
DateTimeDomain(Object aValue)
Constructor which sets the domain's value to the specified argument. |
Method Summary | |
String |
getDate()
Retrieves a String representation of this domain's
Timestamp in date format. |
String |
getDateTime()
Retrieves a String representation of this domain's
Timestamp in datetime format. |
protected String |
getValueClass()
The base class Domain will verify that any specified
values are of this type or a subclass of this type. |
void |
setDate(String aDate)
Sets this domain Timestamp value based on the specified date. |
void |
setDateTime(String aDateTime)
Sets this domain Timestamp value based on the specified datetime. |
Methods inherited from class org.arch4j.domain.Domain |
getValue, setValue, toString, validate, validateType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String COMMON_DATE_FORMAT
public static final String COMMON_DATETIME_FORMAT
Constructor Detail |
public DateTimeDomain()
Domain
, will
set the domain's value to null
.
public DateTimeDomain(Object aValue) throws DomainValidationException
Method Detail |
public void setDateTime(String aDateTime) throws DomainValidationException
Timestamp
value based on the specified datetime.
DomainValidationException
public void setDate(String aDate) throws DomainValidationException
Timestamp
value based on the specified date.
DomainValidationException
public String getDateTime()
String
representation of this domain's
Timestamp
in datetime format. If the Timestamp
is null
, then return an empty string.
public String getDate()
String
representation of this domain's
Timestamp
in date format. If the Timestamp
is null
, then return an empty string.
protected String getValueClass()
Domain
will verify that any specified
values are of this type or a subclass of this type.
getValueClass
in class Domain
String
representation of the Class
type
used by this domain value container.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |