planetj.database.field
Class PhoneNumberField

java.lang.Object
  |
  +--planetj.database.Field
        |
        +--planetj.database.field.StringOrNumberField
              |
              +--planetj.database.field.PhoneNumberField
All Implemented Interfaces:
Cloneable, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IXMLObject, Serializable
Direct Known Subclasses:
CellNumberField, FaxNumberField, PhoneNumberAreaCodeField

public class PhoneNumberField
extends StringOrNumberField

Represents a PhoneNumber. Programmers can assign either String/Char/VarChar or Decimal Fields to a PhoneNumberField. Creation date: (2/28/2002 3:27:12 PM)

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
Fields inherited from interface planetj.dataengine.security.IGuarded
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED
 
Constructor Summary
PhoneNumberField()
           
 
Method Summary
 String getDisplayValue()
          Returns the display value of this Field as phone number string.
 String getExternalValidationKey()
          Get the key that may be used to uniquely identify Field subclasses for external validation.
 String getValidValuesString()
          This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Example: (123) 456-7890, 1234567890, 123-456-7890" Creation date: (4/5/2002 2:52:46 PM)
 boolean getValueAsBoolean()
          Subclasses must override this to detirmine what their boolean value is.
static short guessFieldClassProbability(FieldDescriptorRow pFDRow, RowCollection pSampleData)
          Subclasses will override to take an educated guess at what the Field Class will be for this FD Row.
 boolean isValidLength(ExecutingContext ec)
          Validate this Field based on its max length attribute.
 boolean isValidValue(ExecutingContext ec)
          Validate this Field value.
 
Methods inherited from class planetj.database.field.StringOrNumberField
createObject, getCopiedValue, getDefaultDatabaseValue, getSQLValue, isValueEqual, isValueGreaterThan, isValueLessThan, setValue
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearValidationExceptions, cloneField, commitValue, concat, create, create, createFromDataType, divide, equals, executeGetterMethod, executeSetterMethod, getAssociationOperation, getAttribute, getAutoUpdateValue, getColumnSpan, getConfigProperty, getCSVField, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayWidth, getExternalName, getFDFData, getFieldClassForDataClass, getFieldDescriptor, getFieldDescriptorSource, getFieldIncrementor, getIndex, getLibrary, getLibraryName, getMaxLength, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getOldValueAsString, getPossibleValues, getPossibleValues, getPreferredDisplayLength, getPreferredJavaDataType, getRow, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLObject, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationInvalidValueString, getValidationRequiredString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, handlePossibleValueOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesSQLOperation, hasPossibleValuesSQLOperation, hasValue, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDate, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumeric, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isReadOnly, isReadOnly, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isString, isStringSQLType, isStringSQLType, isTime, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setInitialValue, setInitialValueAsString, setMaxLength, setName, setRow, setSavepoint, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValue, setValueAsString, setValueToDefault, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhoneNumberField

public PhoneNumberField()
Method Detail

getDisplayValue

public String getDisplayValue()
Returns the display value of this Field as phone number string.

Overrides:
getDisplayValue in class Field
Returns:
java.lang.String

getExternalValidationKey

public String getExternalValidationKey()
Get the key that may be used to uniquely identify Field subclasses for external validation. That is validation outside the Field itself. e.g. Javascript.

Overrides:
getExternalValidationKey in class Field

getValidValuesString

public String getValidValuesString()
This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Example: (123) 456-7890, 1234567890, 123-456-7890" Creation date: (4/5/2002 2:52:46 PM)

Overrides:
getValidValuesString in class Field
Returns:
java.lang.String

getValueAsBoolean

public boolean getValueAsBoolean()
Subclasses must override this to detirmine what their boolean value is. Returns a primitive that represents the value in the specified field.

Specified by:
getValueAsBoolean in class Field
Returns:
boolean

guessFieldClassProbability

public static short guessFieldClassProbability(FieldDescriptorRow pFDRow,
                                               RowCollection pSampleData)
Subclasses will override to take an educated guess at what the Field Class will be for this FD Row. Each subclass will examin fields such as : {DECIMAL_DIGITS, COLUMN_NAME, COLUMN_SIZE, REMARKS, DATA_TYPE, TYPE_NAME} Each subclass will detirmine the probability that it should be the field class for this FD Row. -1 will be returned if there is no chance (0%)this field is the fieldClass for pFDRow. 100 or greater will be returned if this is absolutely 100% the field class for pFDRow Creation date: (6/19/2002 2:55:49 PM)


isValidLength

public boolean isValidLength(ExecutingContext ec)
Validate this Field based on its max length attribute. If the value is is too big, the return false

Overrides:
isValidLength in class Field
Parameters:
ec - The current executing context, which may be null
Returns:
boolean true if valid

isValidValue

public boolean isValidValue(ExecutingContext ec)
Validate this Field value. If the field value is valid, return true,

Overrides:
isValidValue in class Field
Parameters:
ec - The executing context, which may be null
Returns:
boolean true if valid