Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

nectar.record.datatypes
Class RecordEmail  view RecordEmail download RecordEmail.java

java.lang.Object
  extended bynectar.record.datatypes.RecordDataElement
      extended bynectar.record.datatypes.RecordEmail
All Implemented Interfaces:
IRecordDataElement, java.io.Serializable

public final class RecordEmail
extends RecordDataElement


Field Summary
private  java.lang.String value
           
 
Fields inherited from class nectar.record.datatypes.RecordDataElement
nullAllowed
 
Constructor Summary
RecordEmail(java.lang.String fieldName, boolean nullAllowed)
          Creates a new instance of RecordPhone
 
Method Summary
 void assignDataValue(java.lang.Object valueObject)
          Sets the internal value to the given value object.
 java.lang.Object getDataObject()
          Returns the Object that holds the data for this RecordDataElement.
 java.lang.String getDataValue()
           
 java.lang.String getStringValue()
          Returns a datasource parsable String representation of this data element.
 void validate(java.lang.Object candidate)
          Performs input validation on the candidate parameter Object.
 
Methods inherited from class nectar.record.datatypes.RecordDataElement
getFieldName, setFieldName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private java.lang.String value
Constructor Detail

RecordEmail

public RecordEmail(java.lang.String fieldName,
                   boolean nullAllowed)
Creates a new instance of RecordPhone

Method Detail

getDataValue

public java.lang.String getDataValue()

assignDataValue

public void assignDataValue(java.lang.Object valueObject)
Description copied from interface: IRecordDataElement
Sets the internal value to the given value object. This should only be called when the Record data is being loaded from a data source, and no input validation is needed. This method should implicitly throw a NullPointerException if the valueObject parameter is null and a null value isn't allowed, or a ClassCastException when the valueObject is not of the expected type.


getStringValue

public java.lang.String getStringValue()
Description copied from interface: IRecordDataElement
Returns a datasource parsable String representation of this data element.


validate

public void validate(java.lang.Object candidate)
              throws nectar.record.RecordInvalidInputException
Description copied from interface: IRecordDataElement
Performs input validation on the candidate parameter Object. This should be called only by Record.set[Value](). It may be able to support several object types as parameter, but it must be able to parse/validate an object that is the same type than the Elements base type.

If the validation is successful, this Element's value will be equal to the methods' parameter.
On failure, this method throws a RecordInvalidInputException, and the old value is conserved in the data element.

The validation procedures for all implementations of the RecordDataElement class should aim to be very efficient and extremely restrictive, since this validation is the last input check before the data is persisted to the datasource.


getDataObject

public java.lang.Object getDataObject()
Description copied from interface: IRecordDataElement
Returns the Object that holds the data for this RecordDataElement.