|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.persist.util.DateWithoutTime
When building a SQLInsert statement, we had a problem where we had no way of knowing if a given field of class java.util.Date should be formatted to be accepted as a DATE or a DATETIME. Thus this class has been created to be able to check these types. The persistent object's class should define a given field to be of type DateWithoutTime if it's corresponding database column is of type DATE. Simply put, use the following mapping: table column of type DATE --> use the DateWithoutType class table column of type DATETIME --> use the Date class
Constructor Summary | |
DateWithoutTime()
Constructor for the DateWithoutTime object |
|
DateWithoutTime(java.util.Date d)
Constructor for the DateWithoutTime object |
|
DateWithoutTime(long d)
Constructor for the DateWithoutTime object |
Method Summary | |
boolean |
after(DateWithoutTime dwt)
|
boolean |
before(DateWithoutTime dwt)
|
boolean |
equals(java.lang.Object o)
|
long |
getTime()
Gets the Time attribute of the DateWithoutTime object |
static void |
main(java.lang.String[] args)
|
static void |
setDateFormat(java.text.SimpleDateFormat newFormat)
Sets the DateFormat attribute of the DateWithoutTime class |
void |
setTime(long time)
Sets the Time attribute of the DateWithoutTime object |
java.lang.String |
toDatabaseString()
This method was created in VisualAge. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DateWithoutTime()
public DateWithoutTime(long d)
d
- public DateWithoutTime(java.util.Date d)
d
- Method Detail |
public static void setDateFormat(java.text.SimpleDateFormat newFormat)
newFormat
- The new DateFormat valuepublic static void main(java.lang.String[] args)
args
- public void setTime(long time)
time
- The new Time valuepublic long getTime()
public boolean after(DateWithoutTime dwt)
dwt
-
public boolean before(DateWithoutTime dwt)
dwt
-
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
-
public java.lang.String toDatabaseString()
toDatabaseString
in interface ScalarType
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |