com.perdues.db.typeHandlers
Class DateTypeHandler

java.lang.Object
  |
  +--com.perdues.db.typeHandlers.DateTypeHandler
All Implemented Interfaces:
DBTypeHandler

public class DateTypeHandler
extends java.lang.Object
implements DBTypeHandler


Constructor Summary
DateTypeHandler()
           
 
Method Summary
 java.lang.String renderForSQL(ColumnInfo col, Form form, java.lang.String field)
          Permits a String value in standard SQL date format (YYYY-MM-DD), or a GSP virtual date field if no standard SQL date field.
 void storeToForm(ColumnInfo col, java.sql.ResultSet rs, int rsField, Form form, java.lang.String field)
          Stores the value of the numbered field of the ResultSet into the given field of the form.
 void storeToForm(ColumnInfo col, java.sql.ResultSet rs, java.lang.String rsField, Form form, java.lang.String field)
          Stores the value of the named field of the ResultSet into the given field of the form.
 void validate(ColumnInfo col, Form form, java.util.Hashtable errs)
          Checks for a date, either a single field (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTypeHandler

public DateTypeHandler()
Method Detail

renderForSQL

public java.lang.String renderForSQL(ColumnInfo col,
                                     Form form,
                                     java.lang.String field)
Permits a String value in standard SQL date format (YYYY-MM-DD), or a GSP virtual date field if no standard SQL date field.
Specified by:
renderForSQL in interface DBTypeHandler

storeToForm

public void storeToForm(ColumnInfo col,
                        java.sql.ResultSet rs,
                        java.lang.String rsField,
                        Form form,
                        java.lang.String field)
                 throws java.sql.SQLException
Description copied from interface: DBTypeHandler
Stores the value of the named field of the ResultSet into the given field of the form.
Specified by:
storeToForm in interface DBTypeHandler

storeToForm

public void storeToForm(ColumnInfo col,
                        java.sql.ResultSet rs,
                        int rsField,
                        Form form,
                        java.lang.String field)
                 throws java.sql.SQLException
Description copied from interface: DBTypeHandler
Stores the value of the numbered field of the ResultSet into the given field of the form.
Specified by:
storeToForm in interface DBTypeHandler

validate

public void validate(ColumnInfo col,
                     Form form,
                     java.util.Hashtable errs)
Checks for a date, either a single field (e.g. hidden) or a specialized composite Date field. Does not complain if no field is present.
Specified by:
validate in interface DBTypeHandler