Methods Summary |
---|
public java.lang.Object | deepCopyNotNull(java.lang.Object value)
return new Date( ( (java.util.Date) value ).getTime() );
|
public java.lang.Object | fromStringValue(java.lang.String xml)
try {
return new SimpleDateFormat(DATE_FORMAT).parse(xml);
}
catch (ParseException pe) {
throw new HibernateException("could not parse XML", pe);
}
|
public java.lang.Object | get(java.sql.ResultSet rs, java.lang.String name)
return rs.getDate(name);
|
public int | getHashCode(java.lang.Object x, org.hibernate.EntityMode entityMode)
Calendar calendar = java.util.Calendar.getInstance();
calendar.setTime( (java.util.Date) x );
return Hibernate.CALENDAR_DATE.getHashCode(calendar, entityMode);
|
public java.lang.String | getName() return "date";
|
public java.lang.Class | getReturnedClass()
return java.util.Date.class;
|
public boolean | isEqual(java.lang.Object x, java.lang.Object y)
if (x==y) return true;
if (x==null || y==null) return false;
java.util.Date xdate = (java.util.Date) x;
java.util.Date ydate = (java.util.Date) y;
if ( xdate.getTime()==ydate.getTime() ) return true;
Calendar calendar1 = java.util.Calendar.getInstance();
Calendar calendar2 = java.util.Calendar.getInstance();
calendar1.setTime( xdate );
calendar2.setTime( ydate );
return Hibernate.CALENDAR_DATE.isEqual(calendar1, calendar2);
|
public java.lang.String | objectToSQLString(java.lang.Object value, org.hibernate.dialect.Dialect dialect)
return '\'" + new Date( ( (java.util.Date) value ).getTime() ).toString() + '\'";
|
public void | set(java.sql.PreparedStatement st, java.lang.Object value, int index)
Date sqlDate;
if ( value instanceof Date) {
sqlDate = (Date) value;
}
else {
sqlDate = new Date( ( (java.util.Date) value ).getTime() );
}
st.setDate(index, sqlDate);
|
public int | sqlType()
return Types.DATE;
|
public java.lang.Object | stringToObject(java.lang.String xml)
return DateFormat.getDateInstance().parse(xml);
|
public java.lang.String | toString(java.lang.Object val)
return new SimpleDateFormat(DATE_FORMAT).format( (java.util.Date) val );
|