com.perdues.db.typeHandlers
Class EmailTypeHandler

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

public class EmailTypeHandler
extends StringTypeHandler
implements DBTypeHandler

Type handler for the Email address type. This calls Validate.emailIsValid() to validate email addresses.


Constructor Summary
EmailTypeHandler()
           
 
Method Summary
 void validate(ColumnInfo col, Form form, java.util.Hashtable errs)
          Validates a Form field based on type information from the extended database schema.
 
Methods inherited from class com.perdues.db.typeHandlers.StringTypeHandler
renderForSQL, storeToForm, storeToForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.perdues.db.DBTypeHandler
renderForSQL, storeToForm, storeToForm
 

Constructor Detail

EmailTypeHandler

public EmailTypeHandler()
Method Detail

validate

public void validate(ColumnInfo col,
                     Form form,
                     java.util.Hashtable errs)
Description copied from interface: DBTypeHandler
Validates a Form field based on type information from the extended database schema. For any validation problems, the method should add entries to errors, a Hashtable with String keys that are fully-qualified database field names and values that are String messages describing what is required for the form field. A validator is required to check validity as fully as practical. This validation is intended for data entry, to check as far as possible that each data item can be properly stored into the database.

TableInfo.validateRecord calls this for every column of the table so it can accommodate "virtual" form fields that don't map 1-to-1 onto columns.

Specified by:
validate in interface DBTypeHandler
Overrides:
validate in class StringTypeHandler