com.u2d.type.atom
Class DateEO
java.lang.Object
com.u2d.model.AbstractEObject
com.u2d.model.AbstractAtomicEO
com.u2d.type.atom.DateEO
- All Implemented Interfaces:
- Searchable, AtomicEObject, ChangeNotifier, EObject, Viewable, ValidationNotifier, java.io.Serializable, java.lang.Comparable<DateEO>
- Direct Known Subclasses:
- DateWithAge
public class DateEO
- extends AbstractAtomicEO
- implements Searchable, java.lang.Comparable<DateEO>
Represents a Date (time information unimportant. e.g. a date of birth)
- Author:
- Eitan Suez
- See Also:
- Serialized Form
|
Field Summary |
protected java.util.Date |
_value
|
protected static long |
HRS24
|
| Methods inherited from class com.u2d.model.AbstractEObject |
addChangeListener, addPostChangeListener, addValidationListener, currentUser, field, fireStateChanged, fireValidationException, fireValidationException, hbmPersistor, parentObject, persistor, removeChangeListener, removePostChangeListener, removeValidationListener, setField, vmech |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
_value
protected java.util.Date _value
HRS24
protected static long HRS24
DateEO
public DateEO()
DateEO
public DateEO(java.util.Date value)
milisValue
public long milisValue()
dateValue
public java.util.Date dateValue()
setValue
public void setValue(java.util.Date value)
setValue
public void setValue(EObject value)
- Specified by:
setValue in interface EObject- Specified by:
setValue in class AbstractEObject
dayofmonth
public int dayofmonth()
month
public int month()
year
public int year()
daysDifference
public static int daysDifference(DateEO first,
DateEO second)
add
public void add(TimeInterval interval)
subtract
public void subtract(TimeInterval interval)
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface EObject- Specified by:
isEmpty in class AbstractEObject
title
public Title title()
- Specified by:
title in interface EObject- Specified by:
title in class AbstractEObject
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
getRenderer
public AtomicRenderer getRenderer()
- Specified by:
getRenderer in interface AtomicEObject
getEditor
public AtomicEditor getEditor()
- Specified by:
getEditor in interface AtomicEObject
parseValue
public void parseValue(java.lang.String stringValue)
throws java.text.ParseException
- Specified by:
parseValue in interface AtomicEObject
- Throws:
java.text.ParseException
makeCopy
public EObject makeCopy()
- Specified by:
makeCopy in interface EObject- Specified by:
makeCopy in class AbstractEObject
getInequalities
public java.util.List getInequalities()
- Specified by:
getInequalities in interface Searchable
getCustomTypeImplementorClass
public static java.lang.Class getCustomTypeImplementorClass()
getAge
public int getAge()
getAgeYearsAtDate
public int getAgeYearsAtDate(DateEO dateEO)
getAgeYearsAtDate
public int getAgeYearsAtDate(java.util.Date date)
ageString
public java.lang.String ageString()
ageAtDateString
public java.lang.String ageAtDateString(java.util.Date date)
compareTo
public int compareTo(DateEO anotherDateEO)
- Specified by:
compareTo in interface java.lang.Comparable<DateEO>
today
public static DateEO today()