planetj.database.field
Class JavaClassNameField

java.lang.Object
  extended byplanetj.database.Field
      extended byplanetj.database.field.StringOrNumberField
          extended byplanetj.database.field.StringField
              extended byplanetj.database.field.JavaClassNameField
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, ICSVField, IExternallyNamed, IFDFObject, IGuarded, INamed, IPDFField, IXMLObject, java.io.Serializable
Direct Known Subclasses:
DataEngineServletClassName, FieldClassName, FormatterClassName, PossibleValueGetterClassName, RowClassName, RowCollectionClassName

public class JavaClassNameField
extends StringField

A field which holds the name of a Java class

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Field
Field.FieldLocation
 
Field Summary
 
Fields inherited from class planetj.database.Field
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, 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
JavaClassNameField()
           
 
Method Summary
 java.lang.Class getCompatibleClass()
          Gets the class which the class specified in this field must implement or extend
 java.lang.Class getJavaClass()
          Gets the Java class object for this field's value.
protected  java.lang.Class getJavaClassInternal()
          Gets the Java class object for this field's value.
 java.lang.String getJavaClassName()
          Gets the Java class name set on this field's value.
 java.lang.Object getJavaObject()
           
protected  java.lang.Object getJavaObject(java.lang.String className)
           
 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.
protected  boolean isCompatible(java.lang.Class sub, java.lang.Class base)
          Tests if the first argument implements or extends the second
 boolean isValidValue(ExecutingContext ec)
          Validate this Field value.
 void setCompatibleClass(java.lang.Class newCompatibleClass)
          Sets the class which the class specified in this field must implement or extend
 
Methods inherited from class planetj.database.field.StringField
createObject, getCSVField, getExternalValidationKey, getValueAsBoolean, isNumber, isString, isValidLength, isValueEqual, setValue
 
Methods inherited from class planetj.database.field.StringOrNumberField
correctValue, getCopiedValue, getDefaultDatabaseValue, getSQLValue, isValueEqual, isValueGreaterThan, isValueLessThan
 
Methods inherited from class planetj.database.Field
addFieldClassForDataClass, addPropertyChangeListener, appendSQLColumnDefinition, appendSQLNameAndValue, appendSQLNameAndValue, clearTable, clearValidationExceptions, clearValue, cloneFD, cloneField, commitValue, concat, correctSQLLiteral, create, create, createAction, createFromDataType, createInternal, divide, equals, executeGetterMethod, executeSetterMethod, firePropertyChange, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getAssociationOperation, getAttribute, getAutoUpdateValue, getBackgroundColor, getBackgroundColor, getColumnSpan, getConfigProperty, getCSVDisplayField, getCurrentValue, getCurrentValueAsString, getDataSQLOperation, getDate, getDefaultExternalName, getDefaultUsageId, getDefaultValue, getDisplayComponent, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayValue, getDisplayWidth, getExternalName, getFDFData, getFieldClassForDataClass, getFieldClassParameters, getFieldDescriptor, getFieldDescriptorSource, getFieldHandledActionNames, getFieldIncrementor, getFieldSetName, getFormatter, getHorizontalAlignment, getIndex, getLibrary, getLibraryName, getMaxLength, getMaxLength, getMetaDataSystemAlias, getName, getOldValue, getOldValueAsString, getPDFValue, getPossibleValueClass, getPossibleValues, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPossibleValuesSQLOperation, getPreferredDisplayLength, getPreferredJavaDataType, getPVPage, getRow, getSearchDefaultValue, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQLColumnDefinition, getSQLColumnDefinition, getSQLNameAndDefaultValue, getSQLNameAndValue, getSQLNameAndValue, getSQLNullValue, getSQLObject, getSQLType, getSQLType, getSQLTypeName, getSQLTypeName, getSQLValue, getSQLValue, getStaticAttribute, getStaticAttributes, getStatusChange, getStyleClass, getStyleClass, getSystem, getSystemAlias, getSystemURL, getTable, getTableName, getUsageId, getUsageId, getUsageIds, getValidationExceptions, getValidationInvalidLengthString, getValidationInvalidMinLengthString, getValidationInvalidValueString, getValidationRequiredString, getValidValuesString, getValue, getValueAsByte, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsShort, getValueAsString, getXMLData, getXMLTag, guessFieldClassProbability, handleAction, handlePossibleValueOperation, hasAssociationOperation, hasMultipleStyleClasses, hasOldValue, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPossibleValuesOperation, hasUsageId, hasUsageId, hasValue, incrementValue, isActionApplicable, isApplicable, isAuthorizedForEdit, isAuthorizedForRead, isAutoIncrement, isAutoIncrementDatabaseDriven, isAutoIncrementWOWDriven, isAutoUpdateValue, isBoolean, isChanged, isContainsValue, isCurrentValueField, isCurrentValueString, isDate, isDecimalSQLType, isDecimalSQLType, isDefaultValue, isDerived, isDisplayable, isFieldContentDisplayable, isFieldValueDatabaseDefault, isFieldValueNotBlank, isFieldValueNull, isFieldValuePossibleValue, isFieldValuesEqual, isFileUpload, isGuarded, isHelpTextPresent, isInitialized, isNumeric, isNumericSQLType, isNumericSQLType, isPassword, isPhysical, isPossibleValuesSearch, isPrepareFieldValue, isReadOnly, isReadOnly, isReadOnlyOnSearch, isRequired, isRequired, isRequiredOnSearch, isSkeleton, isStatusChange, isStringSQLType, isStringSQLType, isTime, isTimestamp, isUpdateable, isValidationRequiredForAutoPopulate, isValidLength, isValidMinLength, isValidRequired, isValidRequired, isValidValue, isValueEqualToString, lessThan, removePropertyChangeListener, resetDisplayValue, rollbackChanges, setAttribute, setChanged, setClonedValues, setDate, setFieldContentDisplayable, setFieldDescriptor, setHasValue, setIndex, setInitialValue, setInitialValueAsString, setMaxLength, setName, setPVPage, setRow, setSavepoint, setSkeleton, setSQLType, setSQLTypeName, setStaticAttribute, setTable, setValue, setValue, setValueAsString, setValueToDefault, statusChanged, toString, toUpperCase, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaClassNameField

public JavaClassNameField()
Method Detail

getCompatibleClass

public java.lang.Class getCompatibleClass()
Gets the class which the class specified in this field must implement or extend


getJavaClass

public java.lang.Class getJavaClass()
                             throws CMException
Gets the Java class object for this field's value. An exception is thrown if the class name does not represent a valid Java class, or if the class is not compatible with this field's compatible class

Returns:
null if this field does not contain a class name, or the Java class if this field does contain a valid Java class.
Throws:
CMException

getJavaClassInternal

protected java.lang.Class getJavaClassInternal()
                                        throws CMException
Gets the Java class object for this field's value. An exception is thrown if the class name does not represent a valid Java class. The compatible class is not used for any validation

Returns:
null if this field does not contain a class name
Throws:
CMException

getJavaClassName

public java.lang.String getJavaClassName()
Gets the Java class name set on this field's value.

Returns:
field's value which is a Java class name.

getJavaObject

public java.lang.Object getJavaObject()
                               throws CMException
Throws:
CMException

getJavaObject

protected java.lang.Object getJavaObject(java.lang.String className)
                                  throws CMException
Throws:
CMException

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.

Overrides:
getValidationInvalidValueString in class Field

isCompatible

protected boolean isCompatible(java.lang.Class sub,
                               java.lang.Class base)
                        throws CMException
Tests if the first argument implements or extends the second

Throws:
CMException

isValidValue

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

Overrides:
isValidValue in class Field
Parameters:
ec - The executing context, which may be null
Returns:
boolean true if valid
Throws:
CMException

setCompatibleClass

public void setCompatibleClass(java.lang.Class newCompatibleClass)
Sets the class which the class specified in this field must implement or extend