planetj.database.field
Class StringField

java.lang.Object
  |
  +--planetj.database.Field
        |
        +--planetj.database.field.StringOrNumberField
              |
              +--planetj.database.field.StringField
All Implemented Interfaces:
Cloneable, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IXMLObject, Serializable
Direct Known Subclasses:
AbstractBooleanField, Address1Field, Address2Field, CityField, ConnectionStatusField, CreditCardTypeField, CybraFormatField, DataLinkField, FDLibraryNameField, FDNameField, FirstNameField, FlatFileReferenceField, GenderField, ImageURLReferenceField, JavaClassNameField, JSPFileNameField, LastNameField, LowerCaseStringField, PasswordField, RegistrationModeField, StateField, TableField, TestFormatField, UpperCaseStringField, URLReferenceField, UserIdField

public class StringField
extends StringOrNumberField
implements Cloneable, Serializable

Author:
PlanetJ Corporation
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
StringField()
           
 
Method Summary
 Object createObject(String pStringValue)
          Create an object for this Field type using the given String.
 String getCSVField()
          Returns the String value of the Object, that will be written to the CSV file.
 String getExternalValidationKey()
          Get the key that may be used to uniquely identify Field subclasses for external validation.
 boolean getValueAsBoolean()
          Subclasses must override this to detirmine what their boolean value is.
 boolean isNumber()
          This is a not a Number field.
 boolean isString()
          This is a String field.
 boolean isValidLength(ExecutingContext ec)
          Validate this Field based on its max length attribute.
 void setValue(Object pValue)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 
Methods inherited from class planetj.database.field.StringOrNumberField
getCopiedValue, getDefaultDatabaseValue, getSQLValue, isValueEqual, isValueGreaterThan, isValueLessThan
 
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, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayValue, 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, getValidValuesString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, guessFieldClassProbability, 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, isStringSQLType, isStringSQLType, isTime, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, 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

StringField

public StringField()
Method Detail

createObject

public Object createObject(String pStringValue)
Create an object for this Field type using the given String.

Overrides:
createObject in class StringOrNumberField
Parameters:
pStringValue - String

getCSVField

public String getCSVField()
Returns the String value of the Object, that will be written to the CSV file. If the toString method of any Object already does this, then there is no need to implement this interface.

VARCHAR Enclosed by double quotation marks and are not padded to create a fixed length field.

CHAR Enclosed by double quotation marks but are padded with blanks if necessary to create a fixed length field

In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (4/22/2002 2:28:25 PM)

Specified by:
getCSVField in interface ICSVField
Overrides:
getCSVField in class Field
Returns:
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

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

isNumber

public boolean isNumber()
This is a not a Number field.


isString

public boolean isString()
This is a String field.

Overrides:
isString in class Field
Returns:
boolean

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

setValue

public void setValue(Object pValue)
              throws CMException
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. If called and the Field is not updatable a CMException is thrown.

Overrides:
setValue in class StringOrNumberField
CMException