planetj.database
Class Field

java.lang.Object
  extended byplanetj.database.Field
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IPDFField, IXMLObject, java.io.Serializable
Direct Known Subclasses:
BlobField, DateField, LogicalField, SQLOperationField, StringOrNumberField, TempField, TimestampField

public abstract class Field
extends java.lang.Object
implements java.lang.Cloneable, IGuarded, ICSVField, java.io.Serializable, IXMLObject, IFDFObject, IExternallyNamed, IPDFField, IActionObject

Represents a value in a database. A field is associated with a particular library, table, row, and column in the database. Every field has an associated FieldDescriptor which contains metadata about that Field (such as its name, type, length, etc).

All subclasses should have a default constructor.

See Also:
Serialized Form

Nested Class Summary
static class Field.FieldLocation
           
 
Field Summary
static short ALIGN_CENTER
           
static short ALIGN_LEFT
           
static short ALIGN_RIGHT
           
static short ALIGN_UNKNOWN
           
 
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
Field()
           
 
Method Summary
static void addFieldClassForDataClass(java.lang.Class pDataClass, java.lang.Class pFieldClass)
          Maps a data class to a field class, so that future invocations of the getFieldClassForDataClass() method with the data class as the argument will return the field class.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a listener which is informed when this field has its value changed.
static java.lang.StringBuffer appendSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor, DBSystem targetSystem, java.lang.StringBuffer sb)
          This method should append all of the necessary information to create this field within a CREATE TABLE SQL statement.
 java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue, java.lang.StringBuffer sb)
          Appends the field's name and value in SQL format to the StringBuffer.
 java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue, java.lang.String pOperator, java.lang.StringBuffer sb)
          Appends the field's name and value in SQL format to the StringBuffer.
protected  void clearTable()
          Clears the Table object for this Field.
 void clearValidationExceptions()
          Clears any validation exceptions that may have previously been set on this Field.
 void clearValue()
          Clears the value of this Field.
 FieldDescriptorRow cloneFD()
          Get a clone of this field's field descriptor.
 Field cloneField()
          Returns a clone of the Field.
 void commitValue()
          Clears out all old values and save point values to commits current values.
 java.lang.String concat(java.lang.String[] parts)
          Concatenate the field values.
 java.lang.String correctSQLLiteral(java.lang.String value)
          Converts the given literal for SQL.
 java.lang.Object correctValue(java.lang.Object value)
          Correct the given value if needed so it is of the proper type when set on this Field.
static Field create(java.lang.String pName, java.lang.Class pFieldType)
          Create and return a new Field
static Field create(java.lang.String pName, int pSQLType)
          Create and return a new Field
 AbstractAction createAction(java.lang.String name, ExecutingContext ec)
          Create an action for the given action name.
static Field createFromDataType(java.lang.String pName, java.lang.Class pDataType)
          Create and return a new Field, based on the type of data the field should hold.
protected static Field createInternal(java.lang.String pName, java.lang.Class pFieldType)
          Create and return a new Field
abstract  java.lang.Object createObject(java.lang.String pStringValue)
          Create an object for this Field type using the given String.
 java.lang.Double divide(java.lang.String[] fieldNames)
          Divide the two field values.
 boolean equals(java.lang.Object otherField)
          Tests if another field is equal to this field.
 java.lang.Object executeGetterMethod(java.lang.String methodString)
           
 java.lang.Object executeSetterMethod(java.lang.String methodString, java.lang.Object value)
           
protected  void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
          Informs listeners that a property of this field has changed.
 java.lang.String getActionDefaultLocation()
          Get the location where this action is to be generated
 ActionDescriptor getActionDescriptor(AbstractAction action)
          Gets the action descriptor associated with the given action.
 IActionRequest getActionRequest(AbstractAction action, HttpServletRequest request, HttpServletResponse response)
          Get the magic request used to handle a given action.
 IActionRequest getActionRequest(AbstractAction action, java.lang.Object o, HttpServletRequest request, HttpServletResponse response)
          Get the magic request used to handle a given action.
 java.util.List getActions(ExecutingContext ec)
          Get a List of the actions this object supports.
 Operation getAssociationOperation()
          Gets the data Operation of this Field's FieldDescriptor.
 java.lang.Object getAttribute(java.lang.Object key)
          Get an attribute about the Field for the given key.
 java.lang.Object getAutoUpdateValue(ExecutingContext executingContext)
          Get the field's auto update value as a String.
 java.awt.Color getBackgroundColor()
          Gets the background color to use when rendering this field in a non-HTML way
 java.awt.Color getBackgroundColor(ExecutingContext ec)
          Gets the background color to use when rendering this field in a non-HTML way
 int getColumnSpan(boolean isDetails)
          Get the number of columns this field should take up.
 java.lang.Object getConfigProperty(java.lang.String key, ExecutingContext executingContext)
          Get a config property for the given row.
abstract  java.lang.Object getCopiedValue()
          Gets an independent copy of this field's value.
 java.lang.String getCSVDisplayField()
          Returns the String value of the Object, that will be written to the CSV file.
 java.lang.String getCSVField()
          Returns the String value of the Object, that will be written to the CSV file.
 java.lang.Object getCurrentValue(ExecutingContext ec)
          Returns a value that may be retrieved from a database, current time, calculation or other source that that is dynamic.
 java.lang.String getCurrentValueAsString(ExecutingContext ec)
          Returns the value of this field as a String.
 Operation getDataSQLOperation()
          Deprecated. replaced with getAssociationOperation()
 java.util.Date getDate(java.lang.String[] fields)
          Returns a Date that represents the Date of the 3 values passed in as a String[].
abstract  java.lang.String getDefaultDatabaseValue()
          Subclass must override this method and return a default value to be placed in the database when this field is Non-nullable and not required.
static java.lang.String getDefaultExternalName(java.lang.String pClassName)
          Returns an the default external name to use, or null if none is specified.
static java.lang.Integer getDefaultUsageId(java.lang.String pClassName)
          Returns an the default usage id as an Integer or null Creation date: (6/26/2002 3:25:15 PM)
 java.lang.Object getDefaultValue(ExecutingContext ec)
          Get the field's default value as a String.
 int getDisplayComponent()
          Gets the display component which should be used to display this field.
 int getDisplayHeight()
          Gets the Field's display height.
 int getDisplayLength()
          Deprecated. replaced with getDisplayWidth() to keep consistent with what a user sees when they view the field (e.g. width and height of a field)
 int getDisplayOrder()
          Get the display order for this Field.
 java.lang.String getDisplayValue()
          Returns the display value of this Field as a String
 int getDisplayWidth()
          Gets the Field's display width.
 java.lang.String getExternalName()
           
 java.lang.String getExternalValidationKey()
          Get the key that may be used to uniquely identify Field subclasses for external validation.
 java.lang.StringBuffer getFDFData(java.lang.StringBuffer pFDFData)
          This returns a StringBuffer containing all necessary FDF data for this object.
static java.lang.Class getFieldClassForDataClass(java.lang.Class pDataClass)
          Gets the type of Field that is registered to hold a type of data
 java.lang.String[] getFieldClassParameters()
          Get any field class parameters this field might have.
 FieldDescriptorRow getFieldDescriptor()
          Returns the FieldDescriptorRow associated with this field.
 java.lang.String getFieldDescriptorSource()
          Convience method used to return a string containing the fields name, connection alias, library name, and table name.
 java.util.List getFieldHandledActionNames()
          Get a list of action names handled by this Row
 IFieldIncrementor getFieldIncrementor()
          By default, Fields will use the same incrementor for their values.
 java.lang.String getFieldSetName()
          Get this name of the FieldSet this Field is displayed in.
 IFormatter getFormatter()
          Get this field's formatter.
 short getHorizontalAlignment(ExecutingContext ec)
          Gets the alignment for this field, when it is rendered in a non-HTML way
 int getIndex()
          Returns the index of this Field within the Row the Field belongs to.
 Library getLibrary()
          Returns the Library of the Table this Field belongs to.
 java.lang.String getLibraryName()
          Returns the name of the library this Field's table belongs to.
 int getMaxLength()
          Returns the max length of this field.
 int getMaxLength(FileDescriptor fled)
          Returns the max length of this field.
 java.lang.String getMetaDataSystemAlias()
          Gets the alias of the system this Field's Table's Library's DBSystem uses for retrieving its meta data.
 java.lang.String getName()
           
 java.lang.Object getOldValue()
          Returns the previous value the Field use to have.
 java.lang.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).
 java.lang.Object getPDFValue(PDFFileDescriptor descriptor)
          Gets the value to display when this field is rendered in a PDF document
 java.lang.String getPossibleValueClass()
          Returns the fully qualified name for a class implementing the IPossibleValueGetter interface which will handle the retrieving of possible values for this field.
 RowCollection getPossibleValues()
          Returns a RowCollection containing the possible values for the Field.
 RowCollection getPossibleValues(Field fld)
          Returns a RowCollection containing the possible values for the Field.
 java.lang.String getPossibleValuesKey()
          Gets the possible values key for this field.
 Operation getPossibleValuesOperation()
          Gets the Possible Values operation for this field.
 SQLOperation getPossibleValuesSQLOperation()
          Deprecated. operation for possible values could be any type of operation we don't want to restrict to sql only WK 1/27/2004
 int getPreferredDisplayLength()
          Gets the column's preferred display size.
static java.lang.Class getPreferredJavaDataType(int pSQLType)
          Gets the preferred Java class for the SQL type.
 int getPVPage()
          Gets the current page number this field is showing for possible values.
 Row getRow()
          Returns the Row this Field belongs to.
 java.lang.Object getSearchDefaultValue(ExecutingContext ec)
          Gets the default value for this field when it is being used in a search
 int getSecuredTypeId()
          Gets the id of the secured type.
 java.lang.String getSecuredTypeName()
          Gets the secured type name for this Field.
 int getSecurityType()
          Gets the security type of this Field.
 java.lang.String getSQLColumnDefinition()
          This method should return all of the necessary information to create this field within a CREATE TABLE SQL statement.
static java.lang.String getSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor, DBSystem targetSystem)
          This method should return all of the necessary information to create this field within a CREATE TABLE SQL statement.
 java.lang.String getSQLNameAndDefaultValue()
          Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's default value getDefaultDatabaseValue().
 java.lang.String getSQLNameAndValue()
          Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's value.
 java.lang.String getSQLNameAndValue(boolean pUseOriginalValue)
          Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's value.
 java.lang.String getSQLNullValue()
           
 java.lang.Object getSQLObject()
          Gets this field's value as an Object in SQL format.
 int getSQLType()
          Gets the SQL type of the described fields.
static int getSQLType(java.lang.String sqlTypeName)
           
 java.lang.String getSQLTypeName()
          getSQLTypeName method comment.
static java.lang.String getSQLTypeName(int sqlType)
           
 java.lang.String getSQLValue()
          Returns the Field's value in SQL format.
abstract  java.lang.String getSQLValue(boolean pUseOriginalValue)
          Returns the Field's value in SQL format.
 java.lang.String getSQLValue(boolean useOriginalValue, boolean includeQuotes)
          This method is a temporary solution to getting the field's value without appending single quote marks at the beginning and end of the field's value if it normally would have quotes.
 java.lang.Object getStaticAttribute(java.lang.Object key)
           
protected  java.util.Map getStaticAttributes()
           
 int getStatusChange()
          Returns whether or not we notify on a status change
 java.lang.String getStyleClass(ExecutingContext ec)
          Get a Field's style.
 java.lang.String getStyleClass(java.lang.String value, java.lang.String displayValue, ExecutingContext ec)
          Get a Field's style.
 DBSystem getSystem()
          Returns the DBSystem this Fields Table belongs to (its Table gets its DBSystem from its Library).
 java.lang.String getSystemAlias()
          Returns the system alias for the Field's Table.
 java.lang.String getSystemURL()
          Returns the system url this Fields Table's DBSystem has (its Table gets the system url from the Library which gets it from the DBSystem).
 Table getTable()
          Returns the Table to which this Field belongs.
 java.lang.String getTableName()
          Returns the name of the Table this Field belongs to.
 int getUsageId()
          Gets the usage ID associated with this field
 int getUsageId(int usageId)
          Gets the usage ID for the given usage id
 int[] getUsageIds()
          Gets the usage ids of this field.
 ValidationExceptionCollection getValidationExceptions()
          This is lazy inited so if you want to see if this field has any ValidationException, you must check the size() of this List Creation date: (4/5/2002 2:01:13 PM)
 java.lang.String getValidationInvalidLengthString()
          This method will return the long description of why this field's length is invalid and possible actions or examples we could put in this field.
 java.lang.String getValidationInvalidMinLengthString()
          This method will return the long description of why this field's minimum length is invalid and possible actions or examples we could put in this field.
 java.lang.String getValidationInvalidValueString()
          This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field.
 java.lang.String getValidationInvalidValueString(java.lang.String givenValue)
          This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field.
 java.lang.String getValidationRequiredString()
          This method will return the long description of why this field is required and possible actions or examples we could put in this field.
 java.lang.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)
 java.lang.Object getValue()
          Returns the Field's current value.
abstract  boolean getValueAsBoolean()
          Subclasses must override this to determine what their boolean value is.
 byte getValueAsByte()
          Returns a primitive that represents the value in the specified field.
 java.util.Date getValueAsDate()
          Returns a Date that represents the value in the specified field.
 double getValueAsDouble()
          Returns a primitive that represents the value in the specified field.
 float getValueAsFloat()
          Returns a primitive that represents the value in the specified field.
 java.lang.String getValueAsFullLengthString()
          Returns the Field's value as a String.
 int getValueAsInt()
          Returns a primitive that represents the value in the specified field.
 long getValueAsLong()
          Returns a primitive that represents the value in the specified field.
 java.lang.Number getValueAsNumber()
          Returns a Number that represents the value in the specified field.
 short getValueAsShort()
          Returns a primitive that represents the value in the specified field.
 java.lang.String getValueAsString()
          Returns the Field's value as a String.
 java.lang.StringBuffer getXMLData(java.lang.StringBuffer pXMLData)
          This returns a StringBuffer containing all necessary XML data for this object.
 java.lang.String getXMLTag()
          This returns a String representing the XML tag for this field Creation date: (1/21/2002 8:16:25 PM)
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.
 java.lang.Object handleAction(java.lang.String action, ExecutingContext ec)
          Check to see if this Row has child rows.
 void handlePossibleValueOperation(ExecutingContext ec)
          Creation date: (4/23/2003 6:56:22 AM)
 boolean hasAssociationOperation(ExecutingContext ec)
          Checks to see if the field has an associated operation
 boolean hasMultipleStyleClasses(ExecutingContext ec)
          Check if the given Field possibly has more than one style class.
 boolean hasOldValue()
          Returns wheter or not this Field has an old value.
 boolean hasPossibleValuesKeyClassOrOp()
          This method simply tells whether or not there is a value in the PV_LV_ID column.
 boolean hasPossibleValuesOperation()
          Checks to see if the field has an associated PossibleValues Op Creation date: (4/28/2003 2:43:11 PM)
 boolean hasPossibleValuesOperation(ExecutingContext ec)
          Checks to see if the field has an associated PossibleValues Op Creation date: (4/28/2003 2:43:11 PM)
 boolean hasUsageId()
          Check if this field has a usage.
 boolean hasUsageId(int usageId)
          Check if this field has the given usage id.
 boolean hasValue()
          Returns wheter or not this Field's has a value.
 void incrementValue(ExecutingContext ec)
          Increment this Field's value.
 boolean isActionApplicable(java.lang.String actionName, ExecutingContext ec)
          Check to see if the action is applicable for the Field in its current state
 boolean isApplicable(ExecutingContext ec)
          Tests if this field is applicable base on the current executing context
 boolean isAuthorizedForEdit(ExecutingContext pEc)
          Tests if user can edit this field.
 boolean isAuthorizedForRead(ExecutingContext pEc)
          Tests if user can read this field.
 boolean isAutoIncrement(ExecutingContext ec)
          Is this field an auto-increment field?
 boolean isAutoIncrementDatabaseDriven(ExecutingContext ec)
          Is this a database drive auto increment field?
 boolean isAutoIncrementWOWDriven(ExecutingContext ec)
          Is this a WOW drive auto increment field?
 boolean isAutoUpdateValue()
          Returns whether or not this field's value is provided dynamically on update and therefore must have special consideration for updates.
 boolean isBoolean()
          Subclasses should override to change the value
 boolean isChanged()
          Returns wheter or not this Field's value has changed.
 boolean isContainsValue()
          Tests if this field has a value other than null or an empty string
 boolean isCurrentValueField()
          Returns whether or not this field's value is dynamic.
static boolean isCurrentValueString(java.lang.String value)
          Return true is this string is the same as the ICurrentValueField.CURRENT_VALUE.
 boolean isDate()
          Subclasses should override to change the value
 boolean isDecimalSQLType()
          Returns true if the SQLType is a decimal according to Types
static boolean isDecimalSQLType(int pSQLType)
          Returns true if the SQL Type is a decimal according to Types Creation date: (6/20/2002 1:41:00 PM)
 boolean isDefaultValue()
          Returns whether or not this field's value is provided dynamically on insert and therefore must have special consideration for inserts.
 boolean isDerived()
          Returns whether or not this Field is a derived field.
 boolean isDisplayable(ExecutingContext ec)
          Check to see if this Field is displayable.
 boolean isFieldContentDisplayable()
          Tests if the contents of the field should be displayed
 boolean isFieldValueDatabaseDefault()
          Returns true if the value of this field is the same as we default this field to in the database.
 boolean isFieldValueNotBlank()
          Return a boolean indicating if the value is not blank.
 boolean isFieldValueNull()
          Return a boolean indicating if the value of this Field is Null
 boolean isFieldValuePossibleValue(ExecutingContext ec)
          Tests if the field's value is a possible value.
 boolean isFieldValuesEqual(Field field)
          Tests if the value of this field is equal to the specified field's value
 boolean isFileUpload()
           
 boolean isGuarded()
          Check whether this Field is protected (secured)
 boolean isHelpTextPresent()
          Tests if this field has help text
 boolean isInitialized()
          Returns wheter or not this Field's initial value has been set.
 boolean isNumeric()
          Returns true if this class is a subclass of Number Creation date: (4/9/2002 2:33:50 PM)
 boolean isNumericSQLType()
          Returns true if the SQL type is a numeric value in Types
static boolean isNumericSQLType(int pSQLType)
          Returns true if the SQL Type is numeric according to Types Creation date: (6/20/2002 1:41:00 PM)
 boolean isPassword()
          Subclasses should override to change the value.
 boolean isPhysical()
          Tests if a field could be physically present in the database.
 boolean isPossibleValuesSearch()
          Insert the method's description here.
 boolean isPrepareFieldValue(ExecutingContext ec)
          Tests if the field's display value needs to be prepared before being displayed.
 boolean isReadOnly()
          Tests if this field can be updated
 boolean isReadOnly(ExecutingContext pContext)
          Tests whether or not this field is read only.
 boolean isReadOnlyOnSearch(ExecutingContext ec)
          Tests whether or not this field is read only for searches.
 boolean isRequired()
          Tests whether or not this field is required.
 boolean isRequired(ExecutingContext pContext)
          Tests whether or not this field is required.
 boolean isRequiredOnSearch(ExecutingContext ec)
          Tests whether or not this field is required.
 boolean isSkeleton()
          Tests if this field is a skeleton field.
 boolean isStatusChange()
          Check to see if this field is status change.
 boolean isString()
          Subclasses should override to change the value
 boolean isStringSQLType()
          Returns true if the SQL Type is a character according to Types
static boolean isStringSQLType(int pSQLType)
          Returns true if the SQL Type is a character according to Types Creation date: (6/20/2002 1:41:00 PM)
 boolean isTime()
          Subclasses should override to change the value
 boolean isTimestamp()
          Subclasses should override to change the value
 boolean isUpdateable()
          Tests if this field can be updated by the user.
 boolean isValidationRequiredForAutoPopulate(ExecutingContext pEC)
          Insert the method's description here.
 boolean isValidLength()
          Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidLength(ExecutingContext)
 boolean isValidLength(ExecutingContext ec)
          Validate this Field based on its max length attribute.
 boolean isValidMinLength(ExecutingContext ec)
          Validate this Field based on its minLength attribute that is set as a FieldClass parameter.
 boolean isValidRequired()
          Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidRequired(ExecutingContext)
 boolean isValidRequired(ExecutingContext ec)
          Validate this Field based on its required attribute.
 boolean isValidValue()
          Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidValue(ExecutingContext)
 boolean isValidValue(ExecutingContext ec)
          Validate this Field value.
abstract  boolean isValueEqual(java.lang.Object obj)
          Return a boolean indicating if the passed in Object is equal to this Fields value.
 boolean isValueEqualToString(java.lang.String stringValue)
          Creates the proper Object for this Field from the given String and checks to see if it is equal to this Field's value.
abstract  boolean isValueGreaterThan(java.lang.Object obj)
          Returns a boolean indicating if this field is greater than the supplied object.
abstract  boolean isValueLessThan(java.lang.Object obj)
          Returns a boolean indicating if this field is less then the supplied object.
 boolean lessThan(java.lang.Object obj)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a property change listener that was added via the addPropertyChangeListener() method.
 void resetDisplayValue()
          Resets the display to null so it can be recomputed when needed.
 Field rollbackChanges()
          Undo any changes that have been made to this Field since it was read from or written to the database.
 void setAttribute(java.lang.Object key, java.lang.Object value)
          Set the given attribute about this Field for the given key.
 void setChanged(boolean isChanged)
          Set whether or not this Field has changed.
 void setClonedValues(java.lang.Object pValue, java.lang.Object pOldValue)
          This method should only be called when cloning a Field.
 void setDate(java.lang.String[] fields, java.lang.Object value)
          Sets the values of three fields for the year, month, and day of a Date that resulted from a derived field.
 void setFieldContentDisplayable(boolean newFieldContentDisplayable)
          Insert the method's description here.
 void setFieldDescriptor(FieldDescriptorRow pFD)
          Sets the FieldDescriptorRow associated with this field.
protected  void setHasValue(boolean pHasValue)
          Sets whether or not this Field's has a value.
protected  void setIndex(int pIndex)
          Sets the index of this Field within the Row the Field belongs to.
 void setInitialValue(java.lang.Object value)
           
 void setInitialValueAsString(java.lang.String value)
          Create an object for the Field's SQL type.
 void setMaxLength(int length)
          Sets the maximum length of this field's contents.
 void setName(java.lang.String pName)
          Sets this Field's name.
 void setPVPage(int page)
          Sets the current page number this field is showing for possible values.
 void setRow(Row pRow)
          Sets the Row this Field belongs to.
 void setSavepoint()
          Sets the current value as the save point for this Field.
protected  void setSkeleton(boolean newSkeleton)
          Sets if this field is a skeleton field.
 void setSQLType(int pSQLType)
          Sets the SQL type of the described fields.
 void setSQLTypeName(java.lang.String pSQLTypeName)
          setSQLTypeName method comment.
 void setStaticAttribute(java.lang.Object key, java.lang.Object value)
           
 void setTable(Table pTable)
          Sets this Fields Table to which this Field belongs.
 void setValue(double pDouble)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 void setValue(long pLong)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 void setValue(java.lang.Object pValue)
          Sets the current value of the Field to the specified value, and also sets the old value to the previous value.
 void setValueAsString(java.lang.String value)
          Create an object for the Field's SQL type.
 void setValueToDefault(ExecutingContext ec)
          Sets the fields value back to the default value Creation date: Jun 24, 2004 - 3:14:48 PM
protected  void statusChanged(Field pField, ExecutingContext ec)
          Lets this field know that another field has changed its status.
 java.lang.String toString()
          Returns the String representation of this Field.
 java.lang.String toUpperCase()
          This method will UPPERCASE this fields value if it is stored in the databse as a Char or it is a StringField.
 boolean validate(ExecutingContext ec)
          Validate this Field based on it's configuration and value.
 boolean validate(ExecutingContext ec, java.security.Principal pUser)
          Deprecated. by WK on (8/9/2003 9:30:03 AM) because the ExecutingContext contains the user. Replaced with validate(ExecutingContext). This method will no longer be supported as of WOW 7.0.
 boolean validate(int pOperation, java.security.Principal pUser)
          Deprecated. Use the validate() method which takes in an ExecutingContext
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_UNKNOWN

public static final short ALIGN_UNKNOWN
See Also:
Constant Field Values

ALIGN_RIGHT

public static final short ALIGN_RIGHT
See Also:
Constant Field Values

ALIGN_CENTER

public static final short ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_LEFT

public static final short ALIGN_LEFT
See Also:
Constant Field Values
Constructor Detail

Field

public Field()
Method Detail

addFieldClassForDataClass

public static void addFieldClassForDataClass(java.lang.Class pDataClass,
                                             java.lang.Class pFieldClass)
                                      throws CMException
Maps a data class to a field class, so that future invocations of the getFieldClassForDataClass() method with the data class as the argument will return the field class. The default data types (String, Timestamp, and numbers) are already mapped, so this method only needs to be invoked to add special subclasses of Field to the mapping.

This method is not thread safe; it should only be invoked during system intialization before Field and Row objects are being created

Parameters:
pDataClass - The type of data the specified type of field should hold
pFieldClass - The type of field that should hold the specified type of data. This must be a subclass of Field.
Throws:
CMException

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener which is informed when this field has its value changed.


appendSQLColumnDefinition

public static java.lang.StringBuffer appendSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor,
                                                               DBSystem targetSystem,
                                                               java.lang.StringBuffer sb)
                                                        throws DataEngineException
This method should append all of the necessary information to create this field within a CREATE TABLE SQL statement. It should tell at least the field's type and length if necessary and optionally whether or not it is NULL capable or if it has a DEFAULT value

Throws:
DataEngineException

appendSQLNameAndValue

public java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue,
                                                    java.lang.String pOperator,
                                                    java.lang.StringBuffer sb)
                                             throws CMException
Appends the field's name and value in SQL format to the StringBuffer.

Parameters:
pUseOriginalValue -
Returns:
String
Throws:
CMException

appendSQLNameAndValue

public java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue,
                                                    java.lang.StringBuffer sb)
                                             throws CMException
Appends the field's name and value in SQL format to the StringBuffer.

Parameters:
pUseOriginalValue -
Returns:
String
Throws:
CMException

clearTable

protected void clearTable()
Clears the Table object for this Field. This will just reset this fields table To the table of its Row Used for copying one table on a system to a different system Creation date: (6/23/2003 3:23:43 PM)


clearValidationExceptions

public void clearValidationExceptions()
Clears any validation exceptions that may have previously been set on this Field.


clearValue

public final void clearValue()
Clears the value of this Field.


cloneFD

public FieldDescriptorRow cloneFD()
                           throws CMException
Get a clone of this field's field descriptor.

Throws:
CMException

cloneField

public Field cloneField()
                 throws CMException
Returns a clone of the Field.

Throws:
CMException

commitValue

public void commitValue()
Clears out all old values and save point values to commits current values.


concat

public java.lang.String concat(java.lang.String[] parts)
                        throws CMException
Concatenate the field values. The last value in the given String[] determines whether or not to trim values. The second to last value in the String[] denotes the separator to use between the values. And the rest of the beginning values in the String[] are the fields names to concatenate. See Row.concatenateFieldValues(String[], String, boolean) for more details.

Returns:
String
Throws:
CMException

correctValue

public java.lang.Object correctValue(java.lang.Object value)
Correct the given value if needed so it is of the proper type when set on this Field.

Parameters:
value - Object

correctSQLLiteral

public java.lang.String correctSQLLiteral(java.lang.String value)
Converts the given literal for SQL.


createAction

public AbstractAction createAction(java.lang.String name,
                                   ExecutingContext ec)
Description copied from interface: IActionObject
Create an action for the given action name.

Specified by:
createAction in interface IActionObject

create

public static Field create(java.lang.String pName,
                           int pSQLType)
                    throws CMException
Create and return a new Field

Parameters:
pName - The name of the field
pSQLType - The type of data the field will hold. This should be a value from the java.sql.Types class.
Throws:
CMException

create

public static Field create(java.lang.String pName,
                           java.lang.Class pFieldType)
                    throws CMException
Create and return a new Field

Parameters:
pName - The name of the field
pFieldType - The type of field to create
Throws:
CMException

createFromDataType

public static Field createFromDataType(java.lang.String pName,
                                       java.lang.Class pDataType)
                                throws CMException
Create and return a new Field, based on the type of data the field should hold. Fields created from this method are always skeleton fields.

Parameters:
pName - The name of the field
Returns:
A field which can hold the specified type of data, or null if the data type is not recognized
Throws:
CMException

createInternal

protected static Field createInternal(java.lang.String pName,
                                      java.lang.Class pFieldType)
                               throws CMException
Create and return a new Field

Parameters:
pName - The name of the field
pFieldType - The type of field to create
Throws:
CMException

createObject

public abstract java.lang.Object createObject(java.lang.String pStringValue)
                                       throws CMException
Create an object for this Field type using the given String.

Parameters:
pStringValue - String
Throws:
CMException

divide

public java.lang.Double divide(java.lang.String[] fieldNames)
                        throws CMException
Divide the two field values. See Row.divide(String, String) for more details.

Parameters:
fieldNames - names of two fields to divide
Returns:
String
Throws:
CMException

equals

public boolean equals(java.lang.Object otherField)
Tests if another field is equal to this field. Two fields are equal if and only if they have the same name and their values are equal.


executeGetterMethod

public java.lang.Object executeGetterMethod(java.lang.String methodString)

executeSetterMethod

public java.lang.Object executeSetterMethod(java.lang.String methodString,
                                            java.lang.Object value)

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
Informs listeners that a property of this field has changed. If the row to which this field belongs has PropertyChangeEvents enabled, then that Row also informs its listeners that this property has changed. (The Row's listeners see the Row as the source of the PropertyChangedEvent, this Field's listeners see this Field as the source.)


getActionRequest

public final IActionRequest getActionRequest(AbstractAction action,
                                             HttpServletRequest request,
                                             HttpServletResponse response)
Description copied from interface: IActionObject
Get the magic request used to handle a given action.

Specified by:
getActionRequest in interface IActionObject

getActionRequest

public IActionRequest getActionRequest(AbstractAction action,
                                       java.lang.Object o,
                                       HttpServletRequest request,
                                       HttpServletResponse response)
Description copied from interface: IActionObject
Get the magic request used to handle a given action.

Specified by:
getActionRequest in interface IActionObject

getActionDefaultLocation

public java.lang.String getActionDefaultLocation()
Description copied from interface: IActionObject
Get the location where this action is to be generated

Specified by:
getActionDefaultLocation in interface IActionObject

getActionDescriptor

public ActionDescriptor getActionDescriptor(AbstractAction action)
Gets the action descriptor associated with the given action.

Specified by:
getActionDescriptor in interface IActionObject
Parameters:
action -

getActions

public final java.util.List getActions(ExecutingContext ec)
Description copied from interface: IActionObject
Get a List of the actions this object supports.

Specified by:
getActions in interface IActionObject

getAssociationOperation

public Operation getAssociationOperation()
                                  throws CMException
Gets the data Operation of this Field's FieldDescriptor. If one doesn't exists, null is returned..

Throws:
CMException

getAttribute

public java.lang.Object getAttribute(java.lang.Object key)
Get an attribute about the Field for the given key.

Returns:
object identified by the given key.

getAutoUpdateValue

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

Throws:
CMException

getBackgroundColor

public java.awt.Color getBackgroundColor()
                                  throws CMException
Gets the background color to use when rendering this field in a non-HTML way

Throws:
CMException

getBackgroundColor

public java.awt.Color getBackgroundColor(ExecutingContext ec)
                                  throws CMException
Gets the background color to use when rendering this field in a non-HTML way

Specified by:
getBackgroundColor in interface IPDFField
Throws:
CMException

getColumnSpan

public int getColumnSpan(boolean isDetails)
Get the number of columns this field should take up.

Specified by:
getColumnSpan in interface IPDFField
Parameters:
isDetails - whether or not its details or results table being generated

getConfigProperty

public final java.lang.Object getConfigProperty(java.lang.String key,
                                                ExecutingContext executingContext)
Get a config property for the given row.


getCopiedValue

public abstract java.lang.Object getCopiedValue()
Gets an independent copy of this field's value. If the value is immutable, then this method can simply return the value. Otherwise, a clone of the value should be returned.


getCSVDisplayField

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

In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (12/6/2001 2:31:28 AM)

Specified by:
getCSVDisplayField in interface ICSVField
Returns:
String

getCSVField

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

In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (12/6/2001 2:31:28 AM)

Specified by:
getCSVField in interface ICSVField
Returns:
String

getCurrentValue

public java.lang.Object getCurrentValue(ExecutingContext ec)
                                 throws CMException
Returns a value that may be retrieved from a database, current time, calculation or other source that that is dynamic.

Throws:
CMException

getCurrentValueAsString

public java.lang.String getCurrentValueAsString(ExecutingContext ec)
                                         throws CMException
Returns the value of this field as a String.

Throws:
CMException

getDataSQLOperation

public Operation getDataSQLOperation()
                              throws CMException
Deprecated. replaced with getAssociationOperation()

Gets the data Operation of this Field's FieldDescriptor. If one doesn't exists, null is returned..

Throws:
CMException

getDate

public java.util.Date getDate(java.lang.String[] fields)
                       throws DataEngineException
Returns a Date that represents the Date of the 3 values passed in as a String[]. The values should be in the order year, month, day.

Returns:
java.util.Date
Throws:
DataEngineException

getDefaultDatabaseValue

public abstract java.lang.String getDefaultDatabaseValue()
                                                  throws CMException
Subclass must override this method and return a default value to be placed in the database when this field is Non-nullable and not required.

Example: A SS# is not required to be filled in by users, but the database does not allow nulls in that field. SocialSecurityField must override this method and return a default value like -1; Creation date: (4/9/2002 4:09:11 PM)

Throws:
CMException

getDefaultExternalName

public static java.lang.String getDefaultExternalName(java.lang.String pClassName)
Returns an the default external name to use, or null if none is specified. Creation date: (7/23/2003 12:39:37 PM)


getDefaultUsageId

public static java.lang.Integer getDefaultUsageId(java.lang.String pClassName)
Returns an the default usage id as an Integer or null Creation date: (6/26/2002 3:25:15 PM)


getDefaultValue

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

Throws:
CMException

getDisplayComponent

public int getDisplayComponent()
                        throws CMException
Gets the display component which should be used to display this field. Display component constants are defined in IFieldData

Throws:
CMException

getDisplayHeight

public int getDisplayHeight()
                     throws CMException
Gets the Field's display height. This only controls the number of columns in the text field that will be displayed, or the size of the select. It does not restrict the amount of characters that can be entered for a Field's value. If no display height is specified then return -1.

Returns:
display height of this Field
Throws:
CMException

getDisplayLength

public int getDisplayLength()
                     throws CMException
Deprecated. replaced with getDisplayWidth() to keep consistent with what a user sees when they view the field (e.g. width and height of a field)

Gets the column's display size. This only controls the number of columns in the text field that will be displayed. It does not restrict the amount of characters that can be entered. If no display size is specified then return -1. Creation date: (4/10/2003 6:47:34 PM)

Throws:
CMException

getDisplayOrder

public int getDisplayOrder()
Get the display order for this Field. The display order is the order in which the Field appears in its FieldSet.


getDisplayValue

public java.lang.String getDisplayValue()
                                 throws CMException
Returns the display value of this Field as a String

Returns:
java.lang.String
Throws:
CMException

getDisplayWidth

public int getDisplayWidth()
                    throws CMException
Gets the Field's display width. This only controls the number of columns in the text field that will be displayed. It does not restrict the amount of characters that can be entered for a Field's value. If no display size is specified then return -1.

Returns:
display width of this Field
Throws:
CMException

getExternalName

public java.lang.String getExternalName()
                                 throws CMException
Specified by:
getExternalName in interface IExternallyNamed
Throws:
CMException

getExternalValidationKey

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


getFDFData

public java.lang.StringBuffer getFDFData(java.lang.StringBuffer pFDFData)
This returns a StringBuffer containing all necessary FDF data for this object. Creation date: (2/4/2002 4:13:39 PM)

Specified by:
getFDFData in interface IFDFObject

getFieldClassForDataClass

public static java.lang.Class getFieldClassForDataClass(java.lang.Class pDataClass)
Gets the type of Field that is registered to hold a type of data

Parameters:
pDataClass - The type of data the field should hold
Returns:
The appropriate subclass of Field which can hold data of the specified type. This may be null if the data type is not recognized

getFieldClassParameters

public java.lang.String[] getFieldClassParameters()
Get any field class parameters this field might have.


getFieldDescriptor

public FieldDescriptorRow getFieldDescriptor()
                                      throws CMException
Returns the FieldDescriptorRow associated with this field.

Returns:
FieldDescriptorRow
Throws:
CMException

getFieldDescriptorSource

public java.lang.String getFieldDescriptorSource()
Convience method used to return a string containing the fields name, connection alias, library name, and table name.

Returns:
concatination of connection alias, library name, table name, and field name.

getFieldHandledActionNames

public java.util.List getFieldHandledActionNames()
Get a list of action names handled by this Row


getFieldIncrementor

public IFieldIncrementor getFieldIncrementor()
By default, Fields will use the same incrementor for their values. There are special cases where users might want to have a special incrementor. For example, Wabash wanted to have an auto increment field that tacked the year onto the number. So, for auto incremented #'s 100, 101, and 102, for the year 2003 they would want the incrementor to return 10003, 10103, and 10203. Creation date: (2/5/2003 11:48:30 AM)


getFieldSetName

public java.lang.String getFieldSetName()
Get this name of the FieldSet this Field is displayed in.


getFormatter

public IFormatter getFormatter()
Get this field's formatter.


getHorizontalAlignment

public short getHorizontalAlignment(ExecutingContext ec)
                             throws CMException
Gets the alignment for this field, when it is rendered in a non-HTML way

Specified by:
getHorizontalAlignment in interface IPDFField
Throws:
CMException

getIndex

public int getIndex()
Returns the index of this Field within the Row the Field belongs to.

Returns:
int

getLibrary

public Library getLibrary()
Returns the Library of the Table this Field belongs to.

Returns:
Library

getLibraryName

public java.lang.String getLibraryName()
Returns the name of the library this Field's table belongs to.

Returns:
String

getMaxLength

public int getMaxLength()
                 throws CMException
Returns the max length of this field. This information is stored in the FieldDescriptor, and ignores any heading information. This value can be overridden for individual fields with the setMaxLength() method Creation date: (1/24/2002 12:14:15 PM)

Throws:
CMException

getMaxLength

public int getMaxLength(FileDescriptor fled)
                 throws CMException
Returns the max length of this field. This could either be the maximum length that the field's value can have, or possibly the length of the field's header (as defined by the FileDescriptor) if the header is longer that the max length of this field's value.

Throws:
CMException

getMetaDataSystemAlias

public java.lang.String getMetaDataSystemAlias()
Gets the alias of the system this Field's Table's Library's DBSystem uses for retrieving its meta data.

Returns:
String

getName

public java.lang.String getName()
Specified by:
getName in interface INamed

getOldValue

public java.lang.Object getOldValue()
Returns the previous value the Field use to have.

Returns:
Object

getOldValueAsString

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

Returns:
String

getPDFValue

public java.lang.Object getPDFValue(PDFFileDescriptor descriptor)
                             throws CMException
Gets the value to display when this field is rendered in a PDF document

Specified by:
getPDFValue in interface IPDFField
Throws:
CMException

getPossibleValues

public RowCollection getPossibleValues()
                                throws CMException
Returns a RowCollection containing the possible values for the Field.

Returns:
RowCollection
Throws:
CMException

getPossibleValues

public RowCollection getPossibleValues(Field fld)
                                throws CMException
Returns a RowCollection containing the possible values for the Field.

Parameters:
fld - Field
Returns:
RowCollection
Throws:
CMException

getPossibleValuesKey

public java.lang.String getPossibleValuesKey()
                                      throws CMException
Gets the possible values key for this field.

Throws:
CMException

getPossibleValueClass

public java.lang.String getPossibleValueClass()
Returns the fully qualified name for a class implementing the IPossibleValueGetter interface which will handle the retrieving of possible values for this field. Default behavior is to ask the Row

Returns:
String

getPossibleValuesSQLOperation

public final SQLOperation getPossibleValuesSQLOperation()
                                                 throws CMException
Deprecated. operation for possible values could be any type of operation we don't want to restrict to sql only WK 1/27/2004

Gets the Possible Values operation for this field.

Throws:
CMException

getPossibleValuesOperation

public Operation getPossibleValuesOperation()
                                     throws CMException
Gets the Possible Values operation for this field.

Throws:
CMException

getPVPage

public int getPVPage()
Gets the current page number this field is showing for possible values.


getPreferredDisplayLength

public int getPreferredDisplayLength()
                              throws CMException
Gets the column's preferred display size. This only controls the number of columns in the text field that will be displayed. It does not restrict the amount of characters that can be entered. This value is derived by comparing display length, max length, column size. If no display length is specified then use the lesser of max length or column size. Creation date: (4/10/2003 6:47:34 PM)

Throws:
CMException

getPreferredJavaDataType

public static java.lang.Class getPreferredJavaDataType(int pSQLType)
                                                throws CMException
Gets the preferred Java class for the SQL type. It may be possible to translate the SQLType to other Java data types; this is just the preferred one.

Throws:
CMException

getRow

public Row getRow()
Returns the Row this Field belongs to.

Returns:
Row

getSearchDefaultValue

public java.lang.Object getSearchDefaultValue(ExecutingContext ec)
Gets the default value for this field when it is being used in a search


getSecuredTypeId

public int getSecuredTypeId()
Gets the id of the secured type.

Specified by:
getSecuredTypeId in interface IGuarded

getSecuredTypeName

public java.lang.String getSecuredTypeName()
Gets the secured type name for this Field.

Specified by:
getSecuredTypeName in interface IGuarded

getSecurityType

public int getSecurityType()
Gets the security type of this Field.

Specified by:
getSecurityType in interface IGuarded
Returns:
security type

getSQLColumnDefinition

public java.lang.String getSQLColumnDefinition()
                                        throws CMException
This method should return all of the necessary information to create this field within a CREATE TABLE SQL statement. It should tell at least the field's type and length if necessary and optionally whether or not it is NULL capable, UNIQUE, or it is a PRIMARY KEY Creation date: (1/16/2002 2:24:10 PM)

Returns:
java.lang.String
Throws:
CMException

getSQLColumnDefinition

public static java.lang.String getSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor,
                                                      DBSystem targetSystem)
                                               throws DataEngineException
This method should return all of the necessary information to create this field within a CREATE TABLE SQL statement. It should tell at least the field's type and length if necessary and optionally whether or not it is NULL capable or if it has a DEFAULT value

Throws:
DataEngineException

getSQLNameAndDefaultValue

public java.lang.String getSQLNameAndDefaultValue()
                                           throws CMException
Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's default value getDefaultDatabaseValue(). The returned String is typically used to generate a WHERE clause for an SQL statement. Creation date: (4/9/2002 4:28:50 PM)

Throws:
CMException

getSQLNameAndValue

public java.lang.String getSQLNameAndValue()
                                    throws CMException
Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's value. The returned String is typically used to generate a WHERE clause for an SQL statement.

Throws:
CMException

getSQLNameAndValue

public java.lang.String getSQLNameAndValue(boolean pUseOriginalValue)
                                    throws CMException
Gets the Field's name and value in SQL format: "-NAME- = -VALUE-" where -NAME- is the name of this field and -VALUE- is this field's value. The returned String is typically used to generate a WHERE clause for an SQL statement.

Parameters:
pUseOriginalValue - If this is true then the value used will be this field's original value as it was read from the database. Otherwise its current value is used.
Throws:
CMException

getSQLNullValue

public java.lang.String getSQLNullValue()

getSQLObject

public java.lang.Object getSQLObject()
                              throws CMException
Gets this field's value as an Object in SQL format.

Throws:
CMException

getSQLType

public int getSQLType()
               throws CMException
Gets the SQL type of the described fields. SQL types are defined in java.sql.Types

Throws:
CMException

getSQLType

public static int getSQLType(java.lang.String sqlTypeName)

getSQLTypeName

public java.lang.String getSQLTypeName()
                                throws CMException
getSQLTypeName method comment.

Throws:
CMException

getSQLTypeName

public static java.lang.String getSQLTypeName(int sqlType)

getSQLValue

public final java.lang.String getSQLValue()
                                   throws CMException
Returns the Field's value in SQL format. For example, if this field's value is the number 3 then the String "3" is returned. If this field's value is the String "Hello" then the String "'Hello'" is returned.

Throws:
CMException

getSQLValue

public abstract java.lang.String getSQLValue(boolean pUseOriginalValue)
                                      throws CMException
Returns the Field's value in SQL format. For example, if this field's value is the number 3 then the String "3" is returned. If this field's value is the String "Hello" then the String "'Hello'" is returned.

Parameters:
pUseOriginalValue - If this is true then the value used will be this field's original value as it was read from the database. Otherwise its current value is used.
Throws:
CMException

getSQLValue

public final java.lang.String getSQLValue(boolean useOriginalValue,
                                          boolean includeQuotes)
                                   throws CMException
This method is a temporary solution to getting the field's value without appending single quote marks at the beginning and end of the field's value if it normally would have quotes.

Throws:
CMException

getStaticAttribute

public java.lang.Object getStaticAttribute(java.lang.Object key)

getStaticAttributes

protected java.util.Map getStaticAttributes()

getStatusChange

public int getStatusChange()
                    throws CMException
Returns whether or not we notify on a status change

Throws:
CMException

getStyleClass

public java.lang.String getStyleClass(java.lang.String value,
                                      java.lang.String displayValue,
                                      ExecutingContext ec)
Get a Field's style. Field subclasses may override to special case handle custom styles for Fields.

Parameters:
ec - current context in which code is executing
Returns:
Field's style

getStyleClass

public java.lang.String getStyleClass(ExecutingContext ec)
                               throws CMException
Get a Field's style. Field subclasses may override to special case handle custom styles for Fields.

Parameters:
ec - current context in which code is executing
Returns:
Field's style
Throws:
CMException

getSystem

public DBSystem getSystem()
Returns the DBSystem this Fields Table belongs to (its Table gets its DBSystem from its Library).

Returns:
DBsystem

getSystemAlias

public java.lang.String getSystemAlias()
Returns the system alias for the Field's Table.

Returns:
String

getSystemURL

public java.lang.String getSystemURL()
Returns the system url this Fields Table's DBSystem has (its Table gets the system url from the Library which gets it from the DBSystem).

Returns:
String

getTable

public Table getTable()
Returns the Table to which this Field belongs.

Returns:
Table

getTableName

public java.lang.String getTableName()
Returns the name of the Table this Field belongs to.

Returns:
String

getUsageId

public int getUsageId()
Gets the usage ID associated with this field


getUsageId

public int getUsageId(int usageId)
Gets the usage ID for the given usage id


getUsageIds

public int[] getUsageIds()
Gets the usage ids of this field.


getValidationExceptions

public ValidationExceptionCollection getValidationExceptions()
This is lazy inited so if you want to see if this field has any ValidationException, you must check the size() of this List Creation date: (4/5/2002 2:01:13 PM)

Returns:
planetj.exception.ValidationExceptionCollection

getValidationInvalidLengthString

public java.lang.String getValidationInvalidLengthString()
                                                  throws CMException
This method will return the long description of why this field's length is invalid and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements Creation date: (5/16/2002 4:53:27 PM)

Throws:
CMException

getValidationInvalidMinLengthString

public java.lang.String getValidationInvalidMinLengthString()
                                                     throws CMException
This method will return the long description of why this field's minimum length is invalid and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements Creation date: (5/21/2004 10:56:53 AM)

Throws:
CMException

getValidationInvalidValueString

public java.lang.String getValidationInvalidValueString()
This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements


getValidationInvalidValueString

public java.lang.String getValidationInvalidValueString(java.lang.String givenValue)
This method will return the long description of why this field's value is invalid and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements


getValidationRequiredString

public java.lang.String getValidationRequiredString()
                                             throws CMException
This method will return the long description of why this field is required and possible actions or examples we could put in this field. Subclasses can overrride this if can better describe thier requrements Creation date: (5/16/2002 4:53:27 PM)

Throws:
CMException

getValidValuesString

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


getValue

public java.lang.Object getValue()
Returns the Field's current value.

Specified by:
getValue in interface INamed
Returns:
Object

getValueAsBoolean

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

Returns:
boolean

getValueAsByte

public byte getValueAsByte()
Returns a primitive that represents the value in the specified field.

Returns:
byte

getValueAsDate

public java.util.Date getValueAsDate()
Returns a Date that represents the value in the specified field.

Returns:
java.util.Date

getValueAsDouble

public double getValueAsDouble()
Returns a primitive that represents the value in the specified field.

Returns:
double

getValueAsFloat

public float getValueAsFloat()
Returns a primitive that represents the value in the specified field.

Returns:
float

getValueAsFullLengthString

public java.lang.String getValueAsFullLengthString()
                                            throws CMException
Returns the Field's value as a String. Space out using either spaces of 0's depending on the data type

Returns:
String
Throws:
CMException

getValueAsInt

public int getValueAsInt()
Returns a primitive that represents the value in the specified field.

Returns:
int

getValueAsLong

public long getValueAsLong()
Returns a primitive that represents the value in the specified field.

Returns:
long

getValueAsNumber

public java.lang.Number getValueAsNumber()
Returns a Number that represents the value in the specified field.

Returns:
Number

getValueAsShort

public short getValueAsShort()
Returns a primitive that represents the value in the specified field.

Returns:
short

getValueAsString

public java.lang.String getValueAsString()
Returns the Field's value as a String.

Returns:
String

getXMLData

public java.lang.StringBuffer getXMLData(java.lang.StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. Creation date: (1/21/2002 8:16:25 PM)

Specified by:
getXMLData in interface IXMLObject

getXMLTag

public java.lang.String getXMLTag()
This returns a String representing the XML tag for this field Creation date: (1/21/2002 8:16:25 PM)


handleAction

public java.lang.Object handleAction(java.lang.String action,
                                     ExecutingContext ec)
                              throws CMException
Description copied from interface: IActionObject
Check to see if this Row has child rows.

Specified by:
handleAction in interface IActionObject
Throws:
CMException

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)


handlePossibleValueOperation

public void handlePossibleValueOperation(ExecutingContext ec)
                                  throws CMException
Creation date: (4/23/2003 6:56:22 AM)

Parameters:
ec - planetj.dataengine.ExecutingContext
Throws:
CMException

hasAssociationOperation

public boolean hasAssociationOperation(ExecutingContext ec)
Checks to see if the field has an associated operation

Returns:
boolean

hasMultipleStyleClasses

public boolean hasMultipleStyleClasses(ExecutingContext ec)
Check if the given Field possibly has more than one style class.

Parameters:
ec - current context in which code is executing
Returns:
Field's style

hasOldValue

public boolean hasOldValue()
Returns wheter or not this Field has an old value.

Returns:
boolean

hasPossibleValuesKeyClassOrOp

public boolean hasPossibleValuesKeyClassOrOp()
This method simply tells whether or not there is a value in the PV_LV_ID column. However, this column is used both for PossibleValues and for PossibleValuesSearch, so this method does not tell whether or not it is a valid PossibleValuesSearch operation. In order to tell this, you must check isPossibleValuesSearch This method allows for a quick PV check instead of a db hit to retrieve the PV - call another method if not null and then have to retrieve the PV values again. Used in HTMLField.appendInput() Creation date: (4/28/2003 2:43:11 PM)

Returns:
boolean

hasPossibleValuesOperation

public boolean hasPossibleValuesOperation()
Checks to see if the field has an associated PossibleValues Op Creation date: (4/28/2003 2:43:11 PM)

Returns:
boolean

hasPossibleValuesOperation

public boolean hasPossibleValuesOperation(ExecutingContext ec)
Checks to see if the field has an associated PossibleValues Op Creation date: (4/28/2003 2:43:11 PM)

Returns:
boolean

hasValue

public boolean hasValue()
Returns wheter or not this Field's has a value.

Returns:
boolean

incrementValue

public void incrementValue(ExecutingContext ec)
                    throws CMException
Increment this Field's value.

Parameters:
ec -
Throws:
CMException

hasUsageId

public boolean hasUsageId()
Check if this field has a usage.

Returns:
true if this Field has a usage id

hasUsageId

public boolean hasUsageId(int usageId)
Check if this field has the given usage id.

Returns:
true if this Field has a usage id

isActionApplicable

public boolean isActionApplicable(java.lang.String actionName,
                                  ExecutingContext ec)
                           throws CMException
Check to see if the action is applicable for the Field in its current state

Specified by:
isActionApplicable in interface IActionObject
Throws:
CMException

isApplicable

public boolean isApplicable(ExecutingContext ec)
                     throws CMException
Tests if this field is applicable base on the current executing context

Throws:
CMException

isAuthorizedForEdit

public boolean isAuthorizedForEdit(ExecutingContext pEc)
                            throws CMException
Tests if user can edit this field. This method should ask its row

Throws:
CMException

isAuthorizedForRead

public boolean isAuthorizedForRead(ExecutingContext pEc)
                            throws CMException
Tests if user can read this field. This method should ask its row

Throws:
CMException

isAutoIncrement

public boolean isAutoIncrement(ExecutingContext ec)
                        throws CMException
Is this field an auto-increment field?

Throws:
CMException

isAutoIncrementWOWDriven

public boolean isAutoIncrementWOWDriven(ExecutingContext ec)
                                 throws CMException
Is this a WOW drive auto increment field?

Parameters:
ec -
Returns:
Throws:
CMException

isAutoIncrementDatabaseDriven

public boolean isAutoIncrementDatabaseDriven(ExecutingContext ec)
                                      throws CMException
Is this a database drive auto increment field?

Parameters:
ec -
Returns:
Throws:
CMException

isAutoUpdateValue

public boolean isAutoUpdateValue()
Returns whether or not this field's value is provided dynamically on update 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.

Returns:
boolean

isBoolean

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

Returns:
boolean

isChanged

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

Returns:
boolean

isContainsValue

public boolean isContainsValue()
Tests if this field has a value other than null or an empty string


isCurrentValueField

public boolean isCurrentValueField()
Returns whether or not this field's value is dynamic.

Returns:
boolean

isCurrentValueString

public static boolean isCurrentValueString(java.lang.String value)
Return true is this string is the same as the ICurrentValueField.CURRENT_VALUE.


isDate

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

Returns:
boolean

isDecimalSQLType

public final boolean isDecimalSQLType()
Returns true if the SQLType is a decimal according to Types

Returns:
boolean

isDecimalSQLType

public static final boolean isDecimalSQLType(int pSQLType)
Returns true if the SQL Type is a decimal according to Types Creation date: (6/20/2002 1:41:00 PM)


isDefaultValue

public boolean isDefaultValue()
Returns whether or not this field's value is provided dynamically on insert and therefore must have special consideration for inserts. For instance, a field that always has the CURRENT TIMESTAMP for its value would get this value from the database. When we go to insert, this field will be updated every time that the row is inserted.

Returns:
boolean

isDerived

public boolean isDerived()
                  throws CMException
Returns whether or not this Field is a derived field.

Returns:
boolean
Throws:
CMException

isDisplayable

public boolean isDisplayable(ExecutingContext ec)
                      throws CMException
Check to see if this Field is displayable.

Parameters:
ec - context in which code is running.
Returns:
true if Field is displayable
Throws:
CMException

isFieldContentDisplayable

public boolean isFieldContentDisplayable()
Tests if the contents of the field should be displayed


isFieldValueDatabaseDefault

public boolean isFieldValueDatabaseDefault()
                                    throws CMException
Returns true if the value of this field is the same as we default this field to in the database. Example Database Defaults: StringField="" NumberField=0 ="NULL" Creation date: (4/24/2002 7:12:57 PM)

Throws:
CMException

isFieldValueNotBlank

public boolean isFieldValueNotBlank()
Return a boolean indicating if the value is not blank. Not Blank is defined as: Strings: not null & not empty spaces, Numbers: Not Null


isFieldValueNull

public boolean isFieldValueNull()
Return a boolean indicating if the value of this Field is Null


isFieldValuesEqual

public boolean isFieldValuesEqual(Field field)
Tests if the value of this field is equal to the specified field's value


isFileUpload

public boolean isFileUpload()
Returns:
boolean

isGuarded

public boolean isGuarded()
Check whether this Field is protected (secured)

Specified by:
isGuarded in interface IGuarded
Returns:
boolean

isHelpTextPresent

public boolean isHelpTextPresent()
Tests if this field has help text


isInitialized

public boolean isInitialized()
Returns wheter or not this Field's initial value has been set.

Returns:
boolean

isNumeric

public boolean isNumeric()
Returns true if this class is a subclass of Number Creation date: (4/9/2002 2:33:50 PM)


isNumericSQLType

public final boolean isNumericSQLType()
Returns true if the SQL type is a numeric value in Types

Returns:
boolean

isNumericSQLType

public static final boolean isNumericSQLType(int pSQLType)
Returns true if the SQL Type is numeric according to Types Creation date: (6/20/2002 1:41:00 PM)


isPassword

public boolean isPassword()
Subclasses should override to change the value. If a Field's usage id is set to a password field it is also a password field.

Returns:
boolean

isPhysical

public boolean isPhysical()
                   throws CMException
Tests if a field could be physically present in the database. (This does not test whether the data in this field actually is in the database, only if it could be stored in the database.)

Throws:
CMException

isPossibleValuesSearch

public boolean isPossibleValuesSearch()
                               throws CMException
Insert the method's description here. Creation date: (1/15/2003 11:41:34 AM)

Returns:
boolean
Throws:
CMException

isPrepareFieldValue

public boolean isPrepareFieldValue(ExecutingContext ec)
Tests if the field's display value needs to be prepared before being displayed. Preparation replaces any formatting chars (like greater than or less than signs in HTML) will be replaced with the appropriate escape chars. When this return false no preparation is done, and any formating chars will remain in the display value


isReadOnly

public boolean isReadOnly()
                   throws CMException
Tests if this field can be updated

Throws:
CMException

isReadOnly

public boolean isReadOnly(ExecutingContext pContext)
Tests whether or not this field is read only. The default behavior is to ask the Row, which by default uses the FD to determine if this field is read only. Subclasses of Field or Row may change this default behavior.

Parameters:
pContext - The current executing context, which may be null

isReadOnlyOnSearch

public boolean isReadOnlyOnSearch(ExecutingContext ec)
Tests whether or not this field is read only for searches. By default, all Fields are not read only on searches.

Parameters:
ec - The current executing context, which may be null

isRequired

public boolean isRequired()
Tests whether or not this field is required. The default behavior is to ask the Row, which by default uses the FD to determine if this field is required or not. Subclasses of Field or Row may change this default behavior.

Returns:
boolean

isRequired

public boolean isRequired(ExecutingContext pContext)
Tests whether or not this field is required. The default behavior is to ask the Row, which by default uses the FD to determine if this field is required or not. Subclasses of Field or Row may change this default behavior

Parameters:
pContext - The current executing context, which may be null

isRequiredOnSearch

public boolean isRequiredOnSearch(ExecutingContext ec)
Tests whether or not this field is required. The default behavior is to ask the Row, which by default uses the FD to determine if this field is required or not. Subclasses of Field or Row may change this default behavior

Parameters:
ec - The current executing context, which may be null

isSkeleton

public boolean isSkeleton()
Tests if this field is a skeleton field. A skeleton field is a field which does not have field descriptors, and whose type might not be what you expect. A skeleton field will be able to write its value to the database, but may not support other functionality that fields usually do. Typically, skeleton fields are created when the Row.setFieldValue() method is inovked, and no field with the specified name exists.


isStatusChange

public boolean isStatusChange()
Check to see if this field is status change.


isString

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

Returns:
boolean

isStringSQLType

public final boolean isStringSQLType()
Returns true if the SQL Type is a character according to Types

Returns:
boolean

isStringSQLType

public static final boolean isStringSQLType(int pSQLType)
Returns true if the SQL Type is a character according to Types Creation date: (6/20/2002 1:41:00 PM)


isTime

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

Returns:
boolean

isTimestamp

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

Returns:
boolean

isUpdateable

public boolean isUpdateable()
Tests if this field can be updated by the user. Some types of fields may not be updateable; for those types this method should be overridden to return false.


isValidationRequiredForAutoPopulate

public boolean isValidationRequiredForAutoPopulate(ExecutingContext pEC)
Insert the method's description here. Creation date: (11/25/2003 9:54:07 AM)

Parameters:
pEC - planetj.dataengine.ExecutingContext
Returns:
boolean

isValidLength

public final boolean isValidLength()
Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidLength(ExecutingContext)

Validate this Field based on its max length attribute. If the value is is too big, the return false

Returns:
boolean true if valid

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

Parameters:
ec - The current executing context, which may be null
Returns:
boolean true if valid

isValidMinLength

public boolean isValidMinLength(ExecutingContext ec)
                         throws CMException
Validate this Field based on its minLength attribute that is set as a FieldClass parameter. Ex: planetj.database.field.PasswordField,minLength=7 If the value is is too small, the return false

Parameters:
ec - The current executing context, which may be null
Returns:
boolean true if valid
Throws:
CMException - if FieldDescriptor cannot be obtained

isValidRequired

public final boolean isValidRequired()
Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidRequired(ExecutingContext)

Validate this Field based on its required attribute. If the value is null and the field is required, then return false

Returns:
boolean true if valid

isValidRequired

public boolean isValidRequired(ExecutingContext ec)
Validate this Field based on its required attribute. If the value is null and the field is required, then return false

Parameters:
ec - The current executing context, which may be null
Returns:
boolean true if valid

isValidValue

public final boolean isValidValue()
                           throws CMException
Deprecated. (7/21/2003 11:45:58 AM) replaced with isValidValue(ExecutingContext)

Validate this Field value. Subclasses should override and validate according to their field types. If the field value is valid, return true,

Returns:
boolean true if valid
Throws:
CMException

isValidValue

public boolean isValidValue(ExecutingContext ec)
                     throws CMException
Validate this Field value. Subclasses should override and validate according to their field types. If the field value is valid, return true,

Parameters:
ec - The executing context, which may be null
Returns:
boolean true if valid
Throws:
CMException

isValueEqual

public abstract boolean isValueEqual(java.lang.Object obj)
Return a boolean indicating if the passed in Object is equal to this Fields value.


isValueEqualToString

public boolean isValueEqualToString(java.lang.String stringValue)
                             throws CMException
Creates the proper Object for this Field from the given String and checks to see if it is equal to this Field's value.

Throws:
CMException

isValueGreaterThan

public abstract boolean isValueGreaterThan(java.lang.Object obj)
Returns a boolean indicating if this field is greater than the supplied object. the Row the Field belongs to. Subclasses should override and implement as appropriate.

Returns:
boolean

isValueLessThan

public abstract boolean isValueLessThan(java.lang.Object obj)
Returns a boolean indicating if this field is less then the supplied object. the Row the Field belongs to. Subclasses should override and return the appropriate response.

Returns:
boolean

isFieldValuePossibleValue

public boolean isFieldValuePossibleValue(ExecutingContext ec)
                                  throws CMException
Tests if the field's value is a possible value. When this method returns true and the field is rendered as an editable select then the select portion of the editable select will be initially enabled. When this method returns false, the text field/area portion of the editable select will be initially enabled. (This method is only invoked for rendering editable selects.)

Throws:
CMException

lessThan

public boolean lessThan(java.lang.Object obj)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener that was added via the addPropertyChangeListener() method.


resetDisplayValue

public void resetDisplayValue()
Resets the display to null so it can be recomputed when needed.


rollbackChanges

public Field rollbackChanges()
                      throws CMException
Undo any changes that have been made to this Field since it was read from or written to the database. This method will not undo any changes that have been saved to the database.

Returns:
This field is returned
Throws:
CMException

setAttribute

public void setAttribute(java.lang.Object key,
                         java.lang.Object value)
Set the given attribute about this Field for the given key.

Parameters:
key - used to identify the object in the Map.
value - Object to be stored as an attribute.

setChanged

public void setChanged(boolean isChanged)
Set whether or not this Field has changed.

Returns:
boolean

setClonedValues

public void setClonedValues(java.lang.Object pValue,
                            java.lang.Object pOldValue)
This method should only be called when cloning a Field. It allows for the proper setting of both old and current values without changing other properties of the cloned Field.


setDate

public void setDate(java.lang.String[] fields,
                    java.lang.Object value)
             throws CMException
Sets the values of three fields for the year, month, and day of a Date that resulted from a derived field. The values should be in the order year, month, day.

Parameters:
value - Object
Throws:
CMException

setFieldContentDisplayable

public void setFieldContentDisplayable(boolean newFieldContentDisplayable)
Insert the method's description here. Creation date: (8/22/2002 6:02:26 PM)

Parameters:
newFieldContentDisplayable - boolean

setFieldDescriptor

public void setFieldDescriptor(FieldDescriptorRow pFD)
                        throws CMException
Sets the FieldDescriptorRow associated with this field.

Parameters:
pFD - FieldDescriptorRow
Throws:
CMException

setHasValue

protected void setHasValue(boolean pHasValue)
Sets whether or not this Field's has a value.

Parameters:
pHasValue - boolean

setIndex

protected void setIndex(int pIndex)
Sets the index of this Field within the Row the Field belongs to.

Returns:
int

setInitialValue

public void setInitialValue(java.lang.Object value)
                     throws CMException
Throws:
CMException

setInitialValueAsString

public void setInitialValueAsString(java.lang.String value)
                             throws CMException
Create an object for the Field's SQL type. Then set that object to the Field's value. (Note: Field subclasses define the object type to create.

Throws:
CMException

setMaxLength

public void setMaxLength(int length)
Sets the maximum length of this field's contents. Normally this information is stored in the field descriptor, but it can be overridden for an individual field with this method. A negative value means that the field descriptor should be checked for the maximum length


setName

public void setName(java.lang.String pName)
Sets this Field's name.

Parameters:
pName - String

setPVPage

public void setPVPage(int page)
Sets the current page number this field is showing for possible values.


setRow

public void setRow(Row pRow)
            throws DataEngineException
Sets the Row this Field belongs to.

Throws:
DataEngineException

setSavepoint

public void setSavepoint()
Sets the current value as the save point for this Field. If a rollback is done, then the save points value will be set as the Field's value.


setSkeleton

protected void setSkeleton(boolean newSkeleton)
Sets if this field is a skeleton field. A skeleton field is a field which does not have field descriptors, and whose type might not be what you expect. A skeleton field will be able to write its value to the database, but may not support other functionality that fields usually do. Typically, skeleton fields are created when the Row.setFieldValue() method is inovked, and no field with the specified name exists.


setSQLType

public void setSQLType(int pSQLType)
                throws CMException
Sets the SQL type of the described fields. SQL types are defined in java.sql.Types

Throws:
CMException

setSQLTypeName

public void setSQLTypeName(java.lang.String pSQLTypeName)
                    throws CMException
setSQLTypeName method comment.

Throws:
CMException

setStaticAttribute

public void setStaticAttribute(java.lang.Object key,
                               java.lang.Object value)

setTable

public void setTable(Table pTable)
Sets this Fields Table to which this Field belongs.

Parameters:
pTable - Table

setValue

public void setValue(double pDouble)
              throws CMException
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. NOTE: This method will take float types also. If called and the Field is not updatable a CMException is thrown.

Throws:
CMException

setValue

public void setValue(long pLong)
              throws CMException
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. NOTE: This method will take int types also. If called and the Field is not updatable a CMException is thrown.

Throws:
CMException

setValue

public void setValue(java.lang.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.

Throws:
CMException

setValueAsString

public final void setValueAsString(java.lang.String value)
                            throws CMException
Create an object for the Field's SQL type. Then set that object to the Field's value. (Note: Field subclasses define the object type to create.

Parameters:
value - String
Throws:
CMException

statusChanged

protected void statusChanged(Field pField,
                             ExecutingContext ec)
                      throws CMException
Lets this field know that another field has changed its status. Subclasses may override this method.

Parameters:
pField - The field whose status has changed
ec - The current executing context
Throws:
CMException

toString

public java.lang.String toString()
Returns the String representation of this Field.

Returns:
String

toUpperCase

public java.lang.String toUpperCase()
                             throws CMException
This method will UPPERCASE this fields value if it is stored in the databse as a Char or it is a StringField. Dates must be UPPERCASED incase the date format in the DB contains acutal month or day or timezone info Example: Tue May 14 12:23:53 PDT 2002 Times must be UPPERCASED incase the date format in the DB contains acutal month or day or timezone info Example: 14 May 2002 19:26:13 GMT Creation date: (5/14/2002 12:14:39 PM)

Throws:
CMException

validate

public boolean validate(int pOperation,
                        java.security.Principal pUser)
                 throws CMException
Deprecated. Use the validate() method which takes in an ExecutingContext

Validate this Field based on its configuration and field value. If the field value is valid, return true, if not return an exception that encapsulates the error.

Throws:
CMException

setValueToDefault

public void setValueToDefault(ExecutingContext ec)
                       throws CMException
Sets the fields value back to the default value Creation date: Jun 24, 2004 - 3:14:48 PM

Throws:
CMException

validate

public boolean validate(ExecutingContext ec)
                 throws CMException
Validate this Field based on it's configuration and value.

Parameters:
ec - current context in which application is executing
Returns:
true, if Field is valid; false otherwise
Throws:
CMException

validate

public boolean validate(ExecutingContext ec,
                        java.security.Principal pUser)
                 throws CMException
Deprecated. by WK on (8/9/2003 9:30:03 AM) because the ExecutingContext contains the user. Replaced with validate(ExecutingContext). This method will no longer be supported as of WOW 7.0.

Validate this Field based on its configuration and field value. If the field value is valid, return true, if not return an exception that encapsulates the error.

Throws:
CMException