|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ail.core.Type
com.ail.util.DateOfBirth
public class DateOfBirth
| Field Summary |
|---|
| Fields inherited from class com.ail.core.Type |
|---|
jXPathContext, NOT_PERSISTED |
| Constructor Summary | |
|---|---|
DateOfBirth()
Default Constructor. |
|
DateOfBirth(java.util.Date dob)
Constructor |
|
DateOfBirth(int year,
int month,
int day)
Constructor to build a data of birth for a specific date. |
|
| Method Summary | |
|---|---|
int |
ageAtDate(java.util.Date then)
Return the age at a specific date. |
int |
currentAge()
Return the current age |
java.util.Date |
getDate()
Get the dob as a dat |
java.lang.String |
getDateAsString()
Fetch the date in the format defined for the default locale. |
java.lang.String |
getDateAsString(java.util.Locale locale)
Fetch the date in the locale defined format. |
java.lang.String |
getDateAsString(java.lang.String format)
Fetch the date as a String in a specified format. |
void |
setDate(java.util.Date date)
Set the date of birth |
void |
setDateAsString(java.lang.String date)
Set the date from a string in the format defined for the default locale. |
void |
setDateAsString(java.lang.String date,
java.util.Locale locale)
Set the date from a string in the locale defined date format. |
void |
setDateAsString(java.lang.String date,
java.lang.String format)
Set the date from a string in the locale defined date format. |
| Methods inherited from class com.ail.core.Type |
|---|
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateOfBirth()
public DateOfBirth(java.util.Date dob)
dob -
public DateOfBirth(int year,
int month,
int day)
year - Four digit yearmonth - Month number (0-11)day - Day in month| Method Detail |
|---|
public java.util.Date getDate()
public void setDate(java.util.Date date)
date - The data of birthpublic java.lang.String getDateAsString()
public void setDateAsString(java.lang.String date)
throws java.text.ParseException
date - The date as a String
java.text.ParseException - If the String does not represent a valid date in this locale.public java.lang.String getDateAsString(java.util.Locale locale)
locale - Locale to format date for.
public void setDateAsString(java.lang.String date,
java.util.Locale locale)
throws java.text.ParseException
date - The date as a Stringlocale - The locale the date string is in
java.text.ParseException - If the String does not represent a valid date in this locale.public java.lang.String getDateAsString(java.lang.String format)
format - The format of the date String required SimpleDateFormat
public void setDateAsString(java.lang.String date,
java.lang.String format)
throws java.text.ParseException
date - The date as a Stringlocale - The locale the date string is in
java.text.ParseException - If the String does not represent a valid date in this locale.public int currentAge()
public int ageAtDate(java.util.Date then)
then - The date the age should be calculate for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||