planetj.database.field
Class TimeField

java.lang.Object
  extended byplanetj.database.Field
      extended byplanetj.database.field.DateField
          extended byplanetj.database.field.TimeField
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, ICSVField, ICurrentValueField, IDateField, IExternallyNamed, IFDFObject, IGuarded, INamed, IPDFField, IXMLObject, java.io.Serializable

public class TimeField
extends DateField
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
static java.lang.String ISO_FORMAT
           
 
Fields inherited from class planetj.database.field.DateField
LENIENT
 
Fields inherited from class planetj.database.Field
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_UNKNOWN
 
Fields inherited from interface planetj.database.field.ICurrentValueField
CURRENT_VALUE
 
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
 java.lang.Object createObject(java.lang.String strValue)
          Create an object for this Field type using the given String.
static java.util.Date createTime(java.lang.String format, java.lang.String value)
          Create a java.util.Date from the given format and String.
 java.lang.String getCSVFormat()
          Get the CVS format for this time field.
 java.lang.String getDefaultFormat()
          Get the default format for this date field from its system.
 java.lang.String getDisplayFormat()
          Get the display format for this time field.
 java.lang.String getISOFormat()
          Get the ISO format for this time field.
 java.lang.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)
 java.lang.String getSQLValue(boolean useOriginalValue)
          Returns the Field's name and value in SQL format.
 java.lang.Object getValue()
          Get this time field's value.
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(java.lang.Object value)
          Returns a boolean indicating if this field is equal to the supplied object.
 void setValue(java.lang.Object value)
          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, createDate, getCentury, getCopiedValue, getCSVField, getCurrentValue, getCurrentValueAsString, getDefaultDatabaseValue, getDisplayValue, getJulianFormat, getOldValueAsString, getSQLObject, getSQLValue, getValidValuesString, getValueAsBoolean, getValueAsString, getYear, isValidLength, isValidValue, isValueGreaterThan, isValueLessThan, setValue
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearTable, clearValidationExceptions, clearValue, cloneFD, commitValue, concat, correctSQLLiteral, correctValue, create, create, createAction, createFromDataType, createInternal, divide, equals, executeGetterMethod, executeSetterMethod, firePropertyChange, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getAssociationOperation, getAttribute, getAutoUpdateValue, getBackgroundColor, getBackgroundColor, getColumnSpan, getConfigProperty, getCSVDisplayField, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayComponent, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayValue, getDisplayWidth, getExternalName, getExternalValidationKey, getFDFData, getFieldClassForDataClass, getFieldClassParameters, getFieldDescriptor, getFieldDescriptorSource, getFieldHandledActionNames, getFieldIncrementor, getFieldSetName, getFormatter, getHorizontalAlignment, getIndex, getLibrary, getLibraryName, getMaxLength, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getPDFValue, getPossibleValueClass, getPossibleValues, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPossibleValuesSQLOperation, getPreferredDisplayLength, getPreferredJavaDataType, getPVPage, getRow, getSearchDefaultValue, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLNullValue, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStaticAttributes, getStatusChange, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getUsageId, getUsageId, getUsageIds, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationInvalidValueString, getValidationRequiredString, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getXMLData, getXMLTag, handleAction, handlePossibleValueOperation, hasAssociationOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPossibleValuesOperation, hasUsageId, hasUsageId, hasValue, incrementValue, isActionApplicable, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoIncrement, isAutoIncrementDatabaseDriven, isAutoIncrementWOWDriven, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFieldValuePossibleValue, isFieldValuesEqual, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumeric, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isPrepareFieldValue, isReadOnly, isReadOnly, isReadOnlyOnSearch, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isStatusChange, isString, isStringSQLType, isStringSQLType, isTimestamp, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, resetDisplayValue, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setHasValue, setIndex, setInitialValue, setInitialValueAsString, setMaxLength, setName, setPVPage, setRow, setSavepoint, setSkeleton, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValueAsString, setValueToDefault, statusChanged, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface planetj.database.field.ICurrentValueField
getAutoUpdateValue, getDefaultValue
 

Field Detail

ISO_FORMAT

public static final java.lang.String ISO_FORMAT
See Also:
Constant Field Values
Constructor Detail

TimeField

public TimeField()
Method Detail

createObject

public java.lang.Object createObject(java.lang.String strValue)
                              throws ValidationException
Description copied from class: DateField
Create an object for this Field type using the given String.

Overrides:
createObject in class DateField
Throws:
ValidationException

createTime

public static java.util.Date createTime(java.lang.String format,
                                        java.lang.String value)
                                 throws java.text.ParseException
Create a java.util.Date from the given format and String.

Throws:
java.text.ParseException

getCSVFormat

public java.lang.String getCSVFormat()
Get the CVS format for this time field.

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

getDefaultFormat

public java.lang.String getDefaultFormat()
Description copied from class: DateField
Get the default format for this date field from its system.

Specified by:
getDefaultFormat in interface IDateField
Overrides:
getDefaultFormat in class DateField

getDisplayFormat

public java.lang.String getDisplayFormat()
Get the display format for this time field.

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

getISOFormat

public java.lang.String getISOFormat()
Get the ISO format for this time field.

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

getPossibleFormats

public java.lang.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)

Overrides:
getPossibleFormats in class DateField

getSQLValue

public java.lang.String getSQLValue(boolean useOriginalValue)
                             throws CMException
Description copied from class: DateField
Returns the Field's name and value in SQL format.

Overrides:
getSQLValue in class DateField
Returns:
String
Throws:
CMException

getValue

public java.lang.Object getValue()
Get this time field's value.

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

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(java.lang.Object value)
Description copied from class: DateField
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(java.lang.Object value)
              throws CMException
Description copied from class: DateField
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
Throws:
CMException