planetj.database.field
Class TimeField

java.lang.Object
  |
  +--planetj.database.Field
        |
        +--planetj.database.field.DateField
              |
              +--planetj.database.field.TimeField
All Implemented Interfaces:
Cloneable, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IXMLObject, Serializable

public class TimeField
extends DateField
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
static String DEFAULT_FORMAT
           
 
Fields inherited from class planetj.database.field.DateField
INVALID_DATE, ISO_FORMAT, LENIENT, NULL_DATE
 
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
TimeField()
           
 
Method Summary
 Object createObject(String pStringValue)
          Create an object for this Field type using the given String.
 String getCSVFormat()
          Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)
 String getDefaultFormat()
          Returns the Default Format Creation date: (5/11/2002 7:56:58 PM)
 String getDisplayFormat()
          Returns the Default Format Creation date: (5/11/2002 7:56:58 PM)
 String getISOFormat()
          Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)
static String getNullString()
          Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)
 String getOldValueAsString()
          Returns the Field's old value as a String (or the field's current value as a String if it doesn't have an old value).
 String getPossibleFormats()
          This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Examples: (123) 456-7890, 1234567890, 123-456-78890" Creation date: (4/5/2002 2:52:46 PM)
 String getValidValuesString()
          This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Examples: (123) 456-7890, 1234567890, 123-456-78890" Creation date: (4/5/2002 2:52:46 PM)
 Object getValue()
          Returns the value of this field as a Date Object The display value is detirmined by the FieldClass parameter Creation date: (4/8/2002 9:42:38 AM)
 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 isDate()
          Subclasses should override to change the value
 boolean isTime()
          Subclasses should override to change the value
 boolean isValueEqual(Object obj)
          Returns a boolean indicating if this field is equal to the supplied object.
 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.DateField
cloneField, getCopiedValue, getCSVField, getCurrentValue, getCurrentValueAsString, getDefaultDatabaseValue, getDisplayValue, getDisplayValue, getJulianFormat, getSQLObject, getSQLValue, getValueAsString, getValueAsString, isValidLength, isValidValue, isValueGreaterThan, isValueLessThan, setValue
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearValidationExceptions, commitValue, concat, create, create, createFromDataType, divide, equals, executeGetterMethod, executeSetterMethod, getAssociationOperation, getAttribute, getAutoUpdateValue, getColumnSpan, getConfigProperty, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayWidth, getExternalName, getExternalValidationKey, getFDFData, getFieldClassForDataClass, getFieldDescriptor, getFieldDescriptorSource, getFieldIncrementor, getIndex, getLibrary, getLibraryName, getMaxLength, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getPossibleValues, getPossibleValues, getPreferredDisplayLength, getPreferredJavaDataType, getRow, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationInvalidValueString, getValidationRequiredString, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getXMLData, getXMLTag, handlePossibleValueOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesSQLOperation, hasPossibleValuesSQLOperation, hasValue, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, 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, 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, setValueAsString, setValueToDefault, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_FORMAT

public static final String DEFAULT_FORMAT
See Also:
Constant Field Values
Constructor Detail

TimeField

public TimeField()
Method Detail

createObject

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

Overrides:
createObject in class DateField
Parameters:
pStringValue - String

getCSVFormat

public String getCSVFormat()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)

Overrides:
getCSVFormat in class DateField
Returns:
java.lang.String

getDefaultFormat

public String getDefaultFormat()
Returns the Default Format Creation date: (5/11/2002 7:56:58 PM)

Overrides:
getDefaultFormat in class DateField
Returns:
java.lang.String

getDisplayFormat

public String getDisplayFormat()
Returns the Default Format Creation date: (5/11/2002 7:56:58 PM)

Overrides:
getDisplayFormat in class DateField
Returns:
java.lang.String

getISOFormat

public String getISOFormat()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)

Overrides:
getISOFormat in class DateField
Returns:
java.lang.String

getNullString

public static String getNullString()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM)

Returns:
java.lang.String

getOldValueAsString

public String getOldValueAsString()
Returns the Field's old value as a String (or the field's current value as a String if it doesn't have an old value).

Overrides:
getOldValueAsString in class Field
Returns:
String

getPossibleFormats

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

Overrides:
getPossibleFormats in class DateField
Returns:
java.lang.String
Throws:
CMException

getValidValuesString

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

Overrides:
getValidValuesString in class DateField
Returns:
java.lang.String
Throws:
CMException

getValue

public Object getValue()
Returns the value of this field as a Date Object The display value is detirmined by the FieldClass parameter Creation date: (4/8/2002 9:42:38 AM)

Specified by:
getValue in interface INamed
Overrides:
getValue in class DateField
Returns:
Object

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.

Overrides:
getValueAsBoolean in class DateField
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)


isDate

public boolean isDate()
Subclasses should override to change the value

Overrides:
isDate in class DateField
Returns:
boolean

isTime

public boolean isTime()
Subclasses should override to change the value

Overrides:
isTime in class Field
Returns:
boolean

isValueEqual

public boolean isValueEqual(Object obj)
Returns a boolean indicating if this field is equal to the supplied object. the Row the Field belongs to. Subclasses should override and return the appropriate response.

Overrides:
isValueEqual in class DateField
Returns:
boolean

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 DateField
CMException