From: <one...@us...> - 2003-01-26 02:37:05
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv30323/sf/hibernate/type Modified Files: CalendarDateType.java CalendarType.java TimeZoneType.java Log Message: javadoc for Configuration Index: CalendarDateType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/CalendarDateType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CalendarDateType.java 19 Jan 2003 11:47:08 -0000 1.4 --- CalendarDateType.java 26 Jan 2003 02:37:02 -0000 1.5 *************** *** 17,25 **** public class CalendarDateType extends MutableType { ! /** ! * @see net.sf.hibernate.type.NullableType#get(ResultSet, String) ! */ ! public Object get(ResultSet rs, String name) ! throws HibernateException, SQLException { Date date = rs.getDate(name); --- 17,21 ---- public class CalendarDateType extends MutableType { ! public Object get(ResultSet rs, String name) throws HibernateException, SQLException { Date date = rs.getDate(name); *************** *** 35,57 **** } ! /** ! * @see net.sf.hibernate.type.NullableType#set(PreparedStatement, Object, int) ! */ ! public void set(PreparedStatement st, Object value, int index) ! throws HibernateException, SQLException { st.setDate( index, new Date( ( (Calendar) value ).getTime().getTime() ) ); } - /** - * @see net.sf.hibernate.type.NullableType#sqlType() - */ public int sqlType() { return Types.DATE; } - /** - * @see net.sf.hibernate.type.NullableType#toXML(Object) - */ public String toXML(Object value) throws HibernateException { //TODO: --- 31,43 ---- } ! public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { st.setDate( index, new Date( ( (Calendar) value ).getTime().getTime() ) ); } public int sqlType() { return Types.DATE; } public String toXML(Object value) throws HibernateException { //TODO: *************** *** 59,79 **** } - /** - * @see net.sf.hibernate.type.NullableType#deepCopyNotNull(Object) - */ public Object deepCopyNotNull(Object value) throws HibernateException { return ( (Calendar) value ).clone(); } - /** - * @see net.sf.hibernate.type.Type#returnedClass() - */ public Class getReturnedClass() { return Calendar.class; } - /** - * @see net.sf.hibernate.type.Type#equals(Object, Object) - */ public boolean equals(Object x, Object y) throws HibernateException { if (x==y) return true; --- 45,56 ---- *************** *** 88,94 **** } - /** - * @see net.sf.hibernate.type.Type#getName() - */ public String getName() { return "calendar_date"; --- 65,68 ---- Index: CalendarType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/CalendarType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CalendarType.java 19 Jan 2003 11:47:08 -0000 1.4 --- CalendarType.java 26 Jan 2003 02:37:02 -0000 1.5 *************** *** 17,25 **** public class CalendarType extends MutableType { ! /** ! * @see net.sf.hibernate.type.NullableType#get(ResultSet, String) ! */ ! public Object get(ResultSet rs, String name) ! throws HibernateException, SQLException { Timestamp ts = rs.getTimestamp(name); --- 17,21 ---- public class CalendarType extends MutableType { ! public Object get(ResultSet rs, String name) throws HibernateException, SQLException { Timestamp ts = rs.getTimestamp(name); *************** *** 35,57 **** } ! /** ! * @see net.sf.hibernate.type.NullableType#set(PreparedStatement, Object, int) ! */ ! public void set(PreparedStatement st, Object value, int index) ! throws HibernateException, SQLException { st.setTimestamp( index, new Timestamp( ( (Calendar) value ).getTime().getTime() ) ); } - /** - * @see net.sf.hibernate.type.NullableType#sqlType() - */ public int sqlType() { return Types.TIMESTAMP; } - /** - * @see net.sf.hibernate.type.NullableType#toXML(Object) - */ public String toXML(Object value) throws HibernateException { //TODO: --- 31,43 ---- } ! public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { st.setTimestamp( index, new Timestamp( ( (Calendar) value ).getTime().getTime() ) ); } public int sqlType() { return Types.TIMESTAMP; } public String toXML(Object value) throws HibernateException { //TODO: *************** *** 59,79 **** } - /** - * @see net.sf.hibernate.type.NullableType#deepCopyNotNull(Object) - */ public Object deepCopyNotNull(Object value) throws HibernateException { return ( (Calendar) value ).clone(); } - /** - * @see net.sf.hibernate.type.Type#returnedClass() - */ public Class getReturnedClass() { return Calendar.class; } - /** - * @see net.sf.hibernate.type.Type#equals(Object, Object) - */ public boolean equals(Object x, Object y) throws HibernateException { if (x==y) return true; --- 45,56 ---- *************** *** 92,98 **** } - /** - * @see net.sf.hibernate.type.Type#getName() - */ public String getName() { return "calendar"; --- 69,72 ---- Index: TimeZoneType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/TimeZoneType.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TimeZoneType.java 19 Jan 2003 11:47:08 -0000 1.4 --- TimeZoneType.java 26 Jan 2003 02:37:02 -0000 1.5 *************** *** 18,24 **** public class TimeZoneType extends ImmutableType implements LiteralType { - /** - * @see net.sf.hibernate.type.NullableType#get(ResultSet, String) - */ public Object get(ResultSet rs, String name) throws HibernateException, SQLException { --- 18,21 ---- *************** *** 27,76 **** } ! /** ! * @see net.sf.hibernate.type.NullableType#set(PreparedStatement, Object, int) ! */ ! public void set(PreparedStatement st, Object value, int index) ! throws HibernateException, SQLException { Hibernate.STRING.set(st, ( (TimeZone) value ).getID(), index); } - /** - * @see net.sf.hibernate.type.NullableType#sqlType() - */ public int sqlType() { return Hibernate.STRING.sqlType(); } - /** - * @see net.sf.hibernate.type.NullableType#toXML(Object) - */ public String toXML(Object value) throws HibernateException { return ( (TimeZone) value ).getID(); } - /** - * @see net.sf.hibernate.type.Type#returnedClass() - */ public Class getReturnedClass() { return TimeZone.class; } - /** - * @see net.sf.hibernate.type.Type#equals(Object, Object) - */ public boolean equals(Object x, Object y) throws HibernateException { return ObjectUtils.equals(x, y); } - /** - * @see net.sf.hibernate.type.Type#getName() - */ public String getName() { return "timezone"; } - /** - * @see net.sf.hibernate.type.LiteralType#objectToSQLString(Object) - */ public String objectToSQLString(Object value) throws Exception { return ( (LiteralType) Hibernate.STRING ).objectToSQLString( --- 24,52 ---- } ! ! public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.STRING.set(st, ( (TimeZone) value ).getID(), index); } public int sqlType() { return Hibernate.STRING.sqlType(); } public String toXML(Object value) throws HibernateException { return ( (TimeZone) value ).getID(); } public Class getReturnedClass() { return TimeZone.class; } public boolean equals(Object x, Object y) throws HibernateException { return ObjectUtils.equals(x, y); } public String getName() { return "timezone"; } public String objectToSQLString(Object value) throws Exception { return ( (LiteralType) Hibernate.STRING ).objectToSQLString( |