planetj.database.field
Class LastUpdateTimestampField

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

public class LastUpdateTimestampField
extends TimestampField
implements ICurrentValueField

TimestampField that sets a new timestamp value when being inserted & updated. Creation date: (2/4/2003 3:29:39 PM) Not necessary since fields now check their FD for *CURRENT insert & update values. A TimestampField with *CURRENT default value & *CURRENT auto update value will do the same thing.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
Fields inherited from class planetj.database.field.TimestampField
ISO_FORMAT
 
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
LastUpdateTimestampField()
           
 
Method Summary
 java.lang.Object getAutoUpdateValue(ExecutingContext executingContext)
          Get the field's auto update value as a Timestamp.
 java.lang.Object getDefaultValue(ExecutingContext executingContext)
          Get the field's default value as a Timestamp.
 java.lang.String getSQLValue(boolean pUseOriginalValue)
          Returns the Field's name and value in SQL format.
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 isChanged()
          Returns whether or not this Field's value has changed.
 boolean isCurrentValueField()
          Returns whether or not this field's value is provided by the database and therefore must have special consideration for updates.
 
Methods inherited from class planetj.database.field.TimestampField
cloneField, createObject, createTimestamp, getCopiedValue, getCurrentValue, getCurrentValueAsString, getDefaultDatabaseValue, getDefaultFormat, getDisplayFormat, getDisplayValue, getSQLNullValue, getSQLValue, getValidValuesString, getValueAsBoolean, getValueAsString, isTimestamp, isUseZeroValue, isValueEqual, isValueGreaterThan, isValueLessThan, setUserZeroValue, 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, getBackgroundColor, getBackgroundColor, getColumnSpan, getConfigProperty, getCSVDisplayField, getCSVField, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, 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, getOldValueAsString, getPDFValue, getPossibleValueClass, getPossibleValues, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPossibleValuesSQLOperation, getPreferredDisplayLength, getPreferredJavaDataType, getPVPage, getRow, getSearchDefaultValue, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLObject, 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, getValue, 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, isContainsValue, isCurrentValueString, isDate, 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, isTime, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, 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, 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
getCurrentValue, getCurrentValueAsString
 

Constructor Detail

LastUpdateTimestampField

public LastUpdateTimestampField()
Method Detail

guessFieldClassProbability

public static short guessFieldClassProbability(FieldDescriptorRow pFDRow,
                                               RowCollection pSampleData)
Description copied from class: TimestampField
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)


getAutoUpdateValue

public java.lang.Object getAutoUpdateValue(ExecutingContext executingContext)
                                    throws CMException
Get the field's auto update value as a Timestamp.

Specified by:
getAutoUpdateValue in interface ICurrentValueField
Overrides:
getAutoUpdateValue in class TimestampField
Throws:
CMException

getDefaultValue

public java.lang.Object getDefaultValue(ExecutingContext executingContext)
                                 throws CMException
Get the field's default value as a Timestamp.

Specified by:
getDefaultValue in interface ICurrentValueField
Overrides:
getDefaultValue in class TimestampField
Throws:
CMException

getSQLValue

public java.lang.String getSQLValue(boolean pUseOriginalValue)
Returns the Field's name and value in SQL format.

Overrides:
getSQLValue in class TimestampField
Parameters:
pUseOriginalValue -
Returns:
String

isChanged

public boolean isChanged()
Returns whether or not this Field's value has changed.

Overrides:
isChanged in class Field
Returns:
boolean

isCurrentValueField

public boolean isCurrentValueField()
Returns whether or not this field's value is provided by the database and therefore must have special consideration for updates. For instance, a field that always has the CURRENT TIMESTAMP for its value would get this value from the database. When we go to update, this field will be updated every time that the row is updated, however it will not cause an update in and of itself. Creation date: (2/4/2003 4:40:42 PM)

Overrides:
isCurrentValueField in class Field
Returns:
boolean