info.informatica.data.field
Class EmailField

java.lang.Object
  extended by info.informatica.data.field.DataType
      extended by info.informatica.data.field.StringField
          extended by info.informatica.data.field.EmailField

public class EmailField
extends StringField

Data field for RFC821 email address.

Version:
1.01
Author:
amengual at informatica dot info

Field Summary
 
Fields inherited from class info.informatica.data.field.DataType
DEFAULT_TYPE
 
Constructor Summary
EmailField()
           
EmailField(int dbtype)
           
 
Method Summary
static String getDomainFromEmail(String email)
           
 Object sample()
          Provide a sample of this data type.
 Object validate(FieldName name, Object val)
          validates the value according to requirements of the Data Dictionary / Metadata.
 Object validate(FieldName name, Object email, Object ctx)
          Validates the email using the DirContext ctx JNDI DNS helper object.
 
Methods inherited from class info.informatica.data.field.StringField
objectValue
 
Methods inherited from class info.informatica.data.field.DataType
create, createAs, dataType, equals, getDefaultClassName, getFormat, getIntType, getJavaSQLType, getName, getSize, getTypeName, hashCode, setFormat, setJavaSQLType, setSize, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmailField

public EmailField(int dbtype)

EmailField

public EmailField()
Method Detail

validate

public Object validate(FieldName name,
                       Object val)
                throws DataException
Description copied from class: DataType
validates the value according to requirements of the Data Dictionary / Metadata.

Overrides:
validate in class StringField
val - the value to be verified.
Throws:
DataException - TODO

validate

public Object validate(FieldName name,
                       Object email,
                       Object ctx)
                throws DataException
Validates the email using the DirContext ctx JNDI DNS helper object.

Overrides:
validate in class DataType
Parameters:
email - the email to be verified
ctx - a JNDI DirContext enabling access to DNS provider
Returns:
the validated version of the object (usually the unchanged value argument).
Throws:
DataException - TODO

getDomainFromEmail

public static String getDomainFromEmail(String email)

sample

public Object sample()
Description copied from class: DataType
Provide a sample of this data type. Should be reasonably random.

Overrides:
sample in class StringField
Returns:
the sample, or null if no suitable sample could be produced.