|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.database.Field
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.
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 |
public static final short ALIGN_UNKNOWN
public static final short ALIGN_RIGHT
public static final short ALIGN_CENTER
public static final short ALIGN_LEFT
Constructor Detail |
public Field()
Method Detail |
public static void addFieldClassForDataClass(java.lang.Class pDataClass, java.lang.Class pFieldClass) throws CMException
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.
pDataClass
- The type of data the specified type of field should holdpFieldClass
- The type of field that should hold the specified type of data. This must be a
subclass of Field.
CMException
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public static java.lang.StringBuffer appendSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor, DBSystem targetSystem, java.lang.StringBuffer sb) throws DataEngineException
DataEngineException
public java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue, java.lang.String pOperator, java.lang.StringBuffer sb) throws CMException
pUseOriginalValue
-
CMException
public java.lang.StringBuffer appendSQLNameAndValue(boolean pUseOriginalValue, java.lang.StringBuffer sb) throws CMException
pUseOriginalValue
-
CMException
protected void clearTable()
public void clearValidationExceptions()
public final void clearValue()
public FieldDescriptorRow cloneFD() throws CMException
CMException
public Field cloneField() throws CMException
CMException
public void commitValue()
public java.lang.String concat(java.lang.String[] parts) throws CMException
CMException
public java.lang.Object correctValue(java.lang.Object value)
value
- Objectpublic java.lang.String correctSQLLiteral(java.lang.String value)
public AbstractAction createAction(java.lang.String name, ExecutingContext ec)
IActionObject
createAction
in interface IActionObject
public static Field create(java.lang.String pName, int pSQLType) throws CMException
pName
- The name of the fieldpSQLType
- The type of data the field will hold. This should be a value from the java.sql.Types class.
CMException
public static Field create(java.lang.String pName, java.lang.Class pFieldType) throws CMException
pName
- The name of the fieldpFieldType
- The type of field to create
CMException
public static Field createFromDataType(java.lang.String pName, java.lang.Class pDataType) throws CMException
skeleton
fields.
pName
- The name of the field
CMException
protected static Field createInternal(java.lang.String pName, java.lang.Class pFieldType) throws CMException
pName
- The name of the fieldpFieldType
- The type of field to create
CMException
public abstract java.lang.Object createObject(java.lang.String pStringValue) throws CMException
pStringValue
- String
CMException
public java.lang.Double divide(java.lang.String[] fieldNames) throws CMException
fieldNames
- names of two fields to divide
CMException
public boolean equals(java.lang.Object otherField)
public java.lang.Object executeGetterMethod(java.lang.String methodString)
public 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)
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.)
public final IActionRequest getActionRequest(AbstractAction action, HttpServletRequest request, HttpServletResponse response)
IActionObject
getActionRequest
in interface IActionObject
public IActionRequest getActionRequest(AbstractAction action, java.lang.Object o, HttpServletRequest request, HttpServletResponse response)
IActionObject
getActionRequest
in interface IActionObject
public java.lang.String getActionDefaultLocation()
IActionObject
getActionDefaultLocation
in interface IActionObject
public ActionDescriptor getActionDescriptor(AbstractAction action)
getActionDescriptor
in interface IActionObject
action
- public final java.util.List getActions(ExecutingContext ec)
IActionObject
getActions
in interface IActionObject
public Operation getAssociationOperation() throws CMException
CMException
public java.lang.Object getAttribute(java.lang.Object key)
public java.lang.Object getAutoUpdateValue(ExecutingContext executingContext) throws CMException
CMException
public java.awt.Color getBackgroundColor() throws CMException
CMException
public java.awt.Color getBackgroundColor(ExecutingContext ec) throws CMException
getBackgroundColor
in interface IPDFField
CMException
public int getColumnSpan(boolean isDetails)
getColumnSpan
in interface IPDFField
isDetails
- whether or not its details or results table
being generatedpublic final java.lang.Object getConfigProperty(java.lang.String key, ExecutingContext executingContext)
public abstract java.lang.Object getCopiedValue()
public java.lang.String getCSVDisplayField()
In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (12/6/2001 2:31:28 AM)
getCSVDisplayField
in interface ICSVField
public java.lang.String getCSVField()
In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (12/6/2001 2:31:28 AM)
getCSVField
in interface ICSVField
public java.lang.Object getCurrentValue(ExecutingContext ec) throws CMException
CMException
public java.lang.String getCurrentValueAsString(ExecutingContext ec) throws CMException
CMException
public Operation getDataSQLOperation() throws CMException
CMException
public java.util.Date getDate(java.lang.String[] fields) throws DataEngineException
DataEngineException
public abstract java.lang.String getDefaultDatabaseValue() throws CMException
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)
CMException
public static java.lang.String getDefaultExternalName(java.lang.String pClassName)
public static java.lang.Integer getDefaultUsageId(java.lang.String pClassName)
public java.lang.Object getDefaultValue(ExecutingContext ec) throws CMException
CMException
public int getDisplayComponent() throws CMException
CMException
public int getDisplayHeight() throws CMException
CMException
public int getDisplayLength() throws CMException
CMException
public int getDisplayOrder()
public java.lang.String getDisplayValue() throws CMException
CMException
public int getDisplayWidth() throws CMException
CMException
public java.lang.String getExternalName() throws CMException
getExternalName
in interface IExternallyNamed
CMException
public java.lang.String getExternalValidationKey()
public java.lang.StringBuffer getFDFData(java.lang.StringBuffer pFDFData)
getFDFData
in interface IFDFObject
public static java.lang.Class getFieldClassForDataClass(java.lang.Class pDataClass)
pDataClass
- The type of data the field should hold
public java.lang.String[] getFieldClassParameters()
public FieldDescriptorRow getFieldDescriptor() throws CMException
CMException
public java.lang.String getFieldDescriptorSource()
public java.util.List getFieldHandledActionNames()
public IFieldIncrementor getFieldIncrementor()
public java.lang.String getFieldSetName()
public IFormatter getFormatter()
public short getHorizontalAlignment(ExecutingContext ec) throws CMException
getHorizontalAlignment
in interface IPDFField
CMException
public int getIndex()
public Library getLibrary()
public java.lang.String getLibraryName()
public int getMaxLength() throws CMException
CMException
public int getMaxLength(FileDescriptor fled) throws CMException
CMException
public java.lang.String getMetaDataSystemAlias()
public java.lang.String getName()
getName
in interface INamed
public java.lang.Object getOldValue()
public java.lang.String getOldValueAsString()
public java.lang.Object getPDFValue(PDFFileDescriptor descriptor) throws CMException
getPDFValue
in interface IPDFField
CMException
public RowCollection getPossibleValues() throws CMException
CMException
public RowCollection getPossibleValues(Field fld) throws CMException
fld
- Field
CMException
public java.lang.String getPossibleValuesKey() throws CMException
CMException
public java.lang.String getPossibleValueClass()
IPossibleValueGetter
interface
which will handle the retrieving of possible
values for this field.
Default behavior is to ask the Row
public final SQLOperation getPossibleValuesSQLOperation() throws CMException
CMException
public Operation getPossibleValuesOperation() throws CMException
CMException
public int getPVPage()
public int getPreferredDisplayLength() throws CMException
CMException
public static java.lang.Class getPreferredJavaDataType(int pSQLType) throws CMException
CMException
public Row getRow()
public java.lang.Object getSearchDefaultValue(ExecutingContext ec)
public int getSecuredTypeId()
getSecuredTypeId
in interface IGuarded
public java.lang.String getSecuredTypeName()
getSecuredTypeName
in interface IGuarded
public int getSecurityType()
getSecurityType
in interface IGuarded
public java.lang.String getSQLColumnDefinition() throws CMException
CMException
public static java.lang.String getSQLColumnDefinition(FieldDescriptorRow pFieldDescriptor, DBSystem targetSystem) throws DataEngineException
DataEngineException
public java.lang.String getSQLNameAndDefaultValue() throws CMException
CMException
public java.lang.String getSQLNameAndValue() throws CMException
CMException
public java.lang.String getSQLNameAndValue(boolean pUseOriginalValue) throws CMException
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.
CMException
public java.lang.String getSQLNullValue()
public java.lang.Object getSQLObject() throws CMException
CMException
public int getSQLType() throws CMException
java.sql.Types
CMException
public static int getSQLType(java.lang.String sqlTypeName)
public java.lang.String getSQLTypeName() throws CMException
CMException
public static java.lang.String getSQLTypeName(int sqlType)
public final java.lang.String getSQLValue() throws CMException
CMException
public abstract java.lang.String getSQLValue(boolean pUseOriginalValue) throws CMException
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.
CMException
public final java.lang.String getSQLValue(boolean useOriginalValue, boolean includeQuotes) throws CMException
CMException
public java.lang.Object getStaticAttribute(java.lang.Object key)
protected java.util.Map getStaticAttributes()
public int getStatusChange() throws CMException
CMException
public java.lang.String getStyleClass(java.lang.String value, java.lang.String displayValue, ExecutingContext ec)
ec
- current context in which code is executing
public java.lang.String getStyleClass(ExecutingContext ec) throws CMException
ec
- current context in which code is executing
CMException
public DBSystem getSystem()
public java.lang.String getSystemAlias()
public java.lang.String getSystemURL()
public Table getTable()
public java.lang.String getTableName()
public int getUsageId()
public int getUsageId(int usageId)
public int[] getUsageIds()
public ValidationExceptionCollection getValidationExceptions()
public java.lang.String getValidationInvalidLengthString() throws CMException
CMException
public java.lang.String getValidationInvalidMinLengthString() throws CMException
CMException
public java.lang.String getValidationInvalidValueString()
public java.lang.String getValidationInvalidValueString(java.lang.String givenValue)
public java.lang.String getValidationRequiredString() throws CMException
CMException
public java.lang.String getValidValuesString()
public java.lang.Object getValue()
getValue
in interface INamed
public abstract boolean getValueAsBoolean()
public byte getValueAsByte()
public java.util.Date getValueAsDate()
public double getValueAsDouble()
public float getValueAsFloat()
public java.lang.String getValueAsFullLengthString() throws CMException
CMException
public int getValueAsInt()
public long getValueAsLong()
public java.lang.Number getValueAsNumber()
public short getValueAsShort()
public java.lang.String getValueAsString()
public java.lang.StringBuffer getXMLData(java.lang.StringBuffer pXMLData)
getXMLData
in interface IXMLObject
public java.lang.String getXMLTag()
public java.lang.Object handleAction(java.lang.String action, ExecutingContext ec) throws CMException
IActionObject
handleAction
in interface IActionObject
CMException
public static short guessFieldClassProbability(FieldDescriptorRow pFDRow, RowCollection pSampleData)
public void handlePossibleValueOperation(ExecutingContext ec) throws CMException
ec
- planetj.dataengine.ExecutingContext
CMException
public boolean hasAssociationOperation(ExecutingContext ec)
public boolean hasMultipleStyleClasses(ExecutingContext ec)
ec
- current context in which code is executing
public boolean hasOldValue()
public boolean hasPossibleValuesKeyClassOrOp()
public boolean hasPossibleValuesOperation()
public boolean hasPossibleValuesOperation(ExecutingContext ec)
public boolean hasValue()
public void incrementValue(ExecutingContext ec) throws CMException
ec
-
CMException
public boolean hasUsageId()
public boolean hasUsageId(int usageId)
public boolean isActionApplicable(java.lang.String actionName, ExecutingContext ec) throws CMException
isActionApplicable
in interface IActionObject
CMException
public boolean isApplicable(ExecutingContext ec) throws CMException
CMException
public boolean isAuthorizedForEdit(ExecutingContext pEc) throws CMException
CMException
public boolean isAuthorizedForRead(ExecutingContext pEc) throws CMException
CMException
public boolean isAutoIncrement(ExecutingContext ec) throws CMException
CMException
public boolean isAutoIncrementWOWDriven(ExecutingContext ec) throws CMException
ec
-
CMException
public boolean isAutoIncrementDatabaseDriven(ExecutingContext ec) throws CMException
ec
-
CMException
public boolean isAutoUpdateValue()
public boolean isBoolean()
public boolean isChanged()
public boolean isContainsValue()
public boolean isCurrentValueField()
public static boolean isCurrentValueString(java.lang.String value)
public boolean isDate()
public final boolean isDecimalSQLType()
public static final boolean isDecimalSQLType(int pSQLType)
public boolean isDefaultValue()
public boolean isDerived() throws CMException
CMException
public boolean isDisplayable(ExecutingContext ec) throws CMException
ec
- context in which code is running.
CMException
public boolean isFieldContentDisplayable()
public boolean isFieldValueDatabaseDefault() throws CMException
CMException
public boolean isFieldValueNotBlank()
public boolean isFieldValueNull()
public boolean isFieldValuesEqual(Field field)
public boolean isFileUpload()
public boolean isGuarded()
isGuarded
in interface IGuarded
public boolean isHelpTextPresent()
public boolean isInitialized()
public boolean isNumeric()
public final boolean isNumericSQLType()
public static final boolean isNumericSQLType(int pSQLType)
public boolean isPassword()
public boolean isPhysical() throws CMException
CMException
public boolean isPossibleValuesSearch() throws CMException
CMException
public boolean isPrepareFieldValue(ExecutingContext ec)
public boolean isReadOnly() throws CMException
CMException
public boolean isReadOnly(ExecutingContext pContext)
pContext
- The current executing context, which may be nullpublic boolean isReadOnlyOnSearch(ExecutingContext ec)
ec
- The current executing context, which may be nullpublic boolean isRequired()
public boolean isRequired(ExecutingContext pContext)
pContext
- The current executing context, which may be nullpublic boolean isRequiredOnSearch(ExecutingContext ec)
ec
- The current executing context, which may be nullpublic boolean isSkeleton()
Row.setFieldValue()
method is inovked, and no field with the
specified name exists.
public boolean isStatusChange()
public boolean isString()
public final boolean isStringSQLType()
public static final boolean isStringSQLType(int pSQLType)
public boolean isTime()
public boolean isTimestamp()
public boolean isUpdateable()
public boolean isValidationRequiredForAutoPopulate(ExecutingContext pEC)
pEC
- planetj.dataengine.ExecutingContext
public final boolean isValidLength()
public boolean isValidLength(ExecutingContext ec)
ec
- The current executing context, which may be null
public boolean isValidMinLength(ExecutingContext ec) throws CMException
ec
- The current executing context, which may be null
CMException
- if FieldDescriptor cannot be obtainedpublic final boolean isValidRequired()
public boolean isValidRequired(ExecutingContext ec)
ec
- The current executing context, which may be null
public final boolean isValidValue() throws CMException
CMException
public boolean isValidValue(ExecutingContext ec) throws CMException
ec
- The executing context, which may be null
CMException
public abstract boolean isValueEqual(java.lang.Object obj)
public boolean isValueEqualToString(java.lang.String stringValue) throws CMException
CMException
public abstract boolean isValueGreaterThan(java.lang.Object obj)
public abstract boolean isValueLessThan(java.lang.Object obj)
public boolean isFieldValuePossibleValue(ExecutingContext ec) throws CMException
CMException
public boolean lessThan(java.lang.Object obj)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener()
method.
public void resetDisplayValue()
public Field rollbackChanges() throws CMException
CMException
public void setAttribute(java.lang.Object key, java.lang.Object value)
key
- used to identify the object in the Map.value
- Object to be stored as an attribute.public void setChanged(boolean isChanged)
public void setClonedValues(java.lang.Object pValue, java.lang.Object pOldValue)
public void setDate(java.lang.String[] fields, java.lang.Object value) throws CMException
value
- Object
CMException
public void setFieldContentDisplayable(boolean newFieldContentDisplayable)
newFieldContentDisplayable
- booleanpublic void setFieldDescriptor(FieldDescriptorRow pFD) throws CMException
pFD
- FieldDescriptorRow
CMException
protected void setHasValue(boolean pHasValue)
pHasValue
- booleanprotected void setIndex(int pIndex)
public void setInitialValue(java.lang.Object value) throws CMException
CMException
public void setInitialValueAsString(java.lang.String value) throws CMException
CMException
public void setMaxLength(int length)
public void setName(java.lang.String pName)
pName
- Stringpublic void setPVPage(int page)
public void setRow(Row pRow) throws DataEngineException
DataEngineException
public void setSavepoint()
protected void setSkeleton(boolean newSkeleton)
Row.setFieldValue()
method is inovked, and no field with the
specified name exists.
public void setSQLType(int pSQLType) throws CMException
java.sql.Types
CMException
public void setSQLTypeName(java.lang.String pSQLTypeName) throws CMException
CMException
public void setStaticAttribute(java.lang.Object key, java.lang.Object value)
public void setTable(Table pTable)
pTable
- Tablepublic void setValue(double pDouble) throws CMException
CMException
public void setValue(long pLong) throws CMException
CMException
public void setValue(java.lang.Object pValue) throws CMException
CMException
public final void setValueAsString(java.lang.String value) throws CMException
value
- String
CMException
protected void statusChanged(Field pField, ExecutingContext ec) throws CMException
pField
- The field whose status has changedec
- The current executing context
CMException
public java.lang.String toString()
public java.lang.String toUpperCase() throws CMException
CMException
public boolean validate(int pOperation, java.security.Principal pUser) throws CMException
CMException
public void setValueToDefault(ExecutingContext ec) throws CMException
CMException
public boolean validate(ExecutingContext ec) throws CMException
ec
- current context in which application is executing
CMException
public boolean validate(ExecutingContext ec, java.security.Principal pUser) throws CMException
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |