planetj.database.fielddescriptors
Class TableDescriptor

java.lang.Object
  |
  +--planetj.database.Row
        |
        +--planetj.database.fielddescriptors.FieldDescriptorRow
              |
              +--planetj.database.fielddescriptors.TableDescriptor
All Implemented Interfaces:
Cloneable, IBatchProcessObject, IBusinessObject, ICSVRow, IDistributedExecutableObject, IFDFObject, IFieldData, IGuarded, INamedCollection, INavigationObject, IOwner, IRowCreator, IXMLObject, Serializable

public class TableDescriptor
extends FieldDescriptorRow

Describes a Table in the database

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Row
Row.SpacingRow
 
Field Summary
static String NAME_PREFIX
           
 
Fields inherited from class planetj.database.Row
className, COPY, DELETE, INSERT, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, READ, UPDATE
 
Fields inherited from interface planetj.database.fielddescriptors.IFieldData
APPLICATION_ID, ASSOCIATION_FIELD_ID, ASSOCIATION_ID, AUTHORIZE_EDIT_OPERATION, AUTHORIZE_READ_OPERATION, AUTO_TRIM_ON_READ, AUTO_TRIM_ON_WRITE, AUTO_TRIM_SPACES, AUTO_UPDATE_VALUE, BUFFER_LENGTH, CHAR_OCTET_LENGTH, COLUMN_DEF, COLUMN_NAME, COLUMN_SIZE, COMPANY_ID, CONCURRENCY, CONCURRENT_DELETES_ALLOWED, CONCURRENT_UPDATES_ALLOWED, CONCURRENT_UPDATES_AND_DELETES_ALLOWED, DATA_SQL_OPERATION_ID, DATA_TYPE, DECIMAL_DIGITS, DISPLAY_COMPONENT, DISPLAY_COMPONENT_ASSOC_OPERATION, DISPLAY_COMPONENT_EDITABLE_SELECT, DISPLAY_COMPONENT_EDITABLE_SELECT_TEXT_AREA, DISPLAY_COMPONENT_FILE_UPLOAD, DISPLAY_COMPONENT_LIST, DISPLAY_COMPONENT_RADIO_BUTTON_PV_SELECT, DISPLAY_COMPONENT_SYSTEM, DISPLAY_COMPONENT_TEXT_AREA, DISPLAY_HEIGHT, DISPLAY_LENGTH, DISPLAY_ORDER, DISPLAY_RULE, DISPLAY_RULE_ADMINISTRATOR, DISPLAY_RULE_ALWAYS, DISPLAY_RULE_HIDE_IF_NA_ALWAYS, DISPLAY_RULE_HIDE_IF_NA_ON_INSERT, DISPLAY_RULE_HIDE_IF_NA_ON_UPDATE, DISPLAY_RULE_HIDE_IF_NA_ON_UPDATE_AND_INSERT, DISPLAY_RULE_HIDE_ON_INSERT, DISPLAY_RULE_HIDE_ON_UPDATE, DISPLAY_RULE_HIDE_ON_UPDATE_AND_INSERT, DISPLAY_RULE_NEVER, DIVISION_ID, EXTERNAL_NAME, FIELD_CLASS, FIELD_CLASS_ID, FIELD_DATA_TABLE_NAME, FIELD_DESCRIPTOR_TYPE, FIELD_SET, FORMATTER_CLASS, FORMATTER_CLASS_ID, GETTER_METHOD, HELP_TEXT, ID, IS_AUTO_INCREMENT, IS_CASE_SENSITIVE, IS_CURRENCY, IS_DEFINITELY_WRITABLE, IS_NULLABLE, IS_READ_ONLY, IS_REQUIRED, IS_REQUIRED_ON_SEARCH, IS_SEARCHABLE, IS_SIGNED, IS_SORTABLE, IS_WRITABLE, KEY_POSITION, MAX_LIBRARY_NAME_LENGTH, MAX_TABLE_NAME_LENGTH, NO_CONCURRENT_ALTERATIONS_ALLOWED, NULLABLE, NUM_PREC_RADIX, ORDINAL_POSITION, ORIGIN_DB_METADATA, ORIGIN_FIELDDATA_FILE, ORIGIN_RS_METADATA, OWNER_ID, PARAM_DIGIT_REQUIRED, PARAM_MIN_LENGTH, POSSIBLE_VALUES_KEY, PV_CLASS, PV_CLASS_ID, PV_SQL_OPERATION_ID, REMARKS, SECURITY_ID, SECURITY_TYPE, SETTER_METHOD, SQL_DATA_TYPE, SQL_DATETIME_SUB, STATUS_CHANGE, STATUS_CHANGE_DEFAULT, STATUS_CHANGE_NO, STATUS_CHANGE_YES, STYLE_CLASS, SWITCHES, SYSTEM_ALIAS, SYSTEM_URL, TABLE_CAT, TABLE_ID, TABLE_NAME, TABLE_SCHEM, TYPE_DEFAULT_FIELD_DESCRIPTOR, TYPE_DERIVED_FIELD_DESCRIPTOR, TYPE_DRILL_DOWN_FIELD_DESCRIPTOR, TYPE_NAME, TYPE_ONE_TO_MANY_ASSOCIATION_FIELD_DESCRIPTOR, TYPE_ONE_TO_ONE_ASSOCIATION_FIELD_DESCRIPTOR, TYPE_POSSIBLE_VALUES_FIELD_DESCRIPTOR, TYPE_TABLE_DESCRIPTOR, USAGE_ID, XML_TAG
 
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
TableDescriptor()
           
 
Method Summary
static TableDescriptor createTableDescriptor(Table targetTable)
          Creates a new TableDescriptor object for a Table
 Class getJavaFieldClass()
          Gets the class to instantiate for this field.
static String getTableDescriptorName(String tableName)
          Gets the name of a TableDescriptor based on a table name
static String getTableDescriptorName(Table t)
          Gets the name of a TableDescriptor based on a table
 int insert(SQLContext context)
          Inserts this Row into the specified database.
 boolean isPhysical()
          Tests if this field descriptor describes a field that is physically present in the database
 void setName(Table t)
          Sets the name of this TableDescriptor from a table
 int update(Connection conn, ExecutingContext ec)
          Updates the database with the values in this Row.
 
Methods inherited from class planetj.database.fielddescriptors.FieldDescriptorRow
cloneFD, createDefaultField, createDefaultField, createField, createField, createRow, getApplicationID, getAssociationFieldId, getAssociationId, getAssociationOperation, getAssociationOperationId, getAutoUpdateStringValue, getAutoUpdateValue, getCatalog, getColumnName, getColumnSize, getColumnSystem, getColumnTable, getColumnTable, getColumnTableName, getCompanyID, getConcurrency, getConnectionAlias, getDataSQLOperation, getDataSQLOperationId, getDataType, getDecimalDigits, getDefaultStringValue, getDefaultValue, getDeleteConfirmationMessage, getDisplayComponent, getDisplayHeight, getDisplayLength, getDisplayOrder, getDisplayRule, getDisplayWidth, getDivisionID, getExternalName, getFieldClass, getFieldClassName, getFieldClassParameterDigitRequired, getFieldClassParameterMinLength, getFieldClassParameters, getFieldClassString, getFieldDescriptorType, getFieldSet, getFormatterClass, getFormatterClassParameters, getGetterMethod, getHelpText, getId, getIsNullable, getKeyPostion, getMaxBytes, getName, getNullable, getOrdinalPosition, getOrigin, getOwnerId, getOwnerIdField, getPossibleValueClass, getPossibleValues, getPossibleValuesKey, getPossibleValuesSQLOperationId, getRadix, getRemarks, getSampleFieldData, getSampleTableData, getSchema, getSecuredTypeId, getSecuredTypeName, getSecurityId, getSecurityType, getSetterMethod, getSQLType, getSQLTypeName, getStatusChange, getStyleClass, getSwitches, getSystemURL, getUsageId, getXMLTag, guessFieldClass, hasAutoPopulateOperation, hasDefaultValue, hasFormatter, hasHelpText, hasPossibleValuesKeyClassOrOp, hasPossibleValuesSQLOperation, hasUsageId, isAssignable, isAssociation, isAssociationOperation, isAssociationSpecified, isAuthorizedForEdit, isAuthorizedForRead, isAutoIncrement, isAutoPopulate, isAutoTrimOnRead, isAutoTrimOnWrite, isAutoUpdateValue, isCaseSensitive, isColumnTableChanged, isCurrency, isCurrent, isDataSQLOperation, isDefaultValue, isDerived, isDisplayable, isExistInFDFile, isFileUpload, isGetterMethodSpecified, isGuessFieldClass, isInKey, isLogical, isNullCapable, isPercentage, isPossibleValuesSearch, isReadFromDBMetadata, isReadFromRSMetadata, isReadOnly, isRequired, isRequiredOnSearch, isSearchable, isSetterMethodSpecified, isShared, isSigned, isSortable, setApplicationID, setAssociationFieldId, setAssociationId, setAutoIncrement, setAutoTrimOnRead, setAutoTrimOnWrite, setCaseSensitive, setCatalog, setColumnSize, setColumnTableName, setCompanyID, setConcurrency, setConnectionAlias, setCurrency, setCurrent, setDataSQLOperationId, setDecimalDigits, setDefaultValue, setDisplayComponent, setDisplayHeight, setDisplayLength, setDisplayOrder, setDisplayRule, setDisplayWidth, setDivisionID, setExternalName, setFieldClass, setFieldClass, setFieldDescriptorType, setFieldSet, setFieldValue, setFormatterClass, setGuessFieldClass, setHelpText, setIsNullable, setKeyPosition, setMaxBytes, setName, setNullable, setOrdinalPosition, setPossibleValueClass, setPossibleValuesKey, setPossibleValuesSQLOperationId, setRadix, setReadOnly, setRemarks, setRequired, setSchema, setSearchable, setSigned, setSortable, setSQLType, setSQLTypeName, setStatusChange, setSwitches, setSystemURL, setTable, setUsageId, setXMLTag, toString, transferDataTo, validate
 
Methods inherited from class planetj.database.Row
add, add, addObject, addPropertyChangeListener, addPropertyChangeListener, addRowEventListener, addRowEventListeners, addTable, appendDisplayType, batchProcess, clearFields, clearTables, clearValidationException, clone, cloneRow, commitFieldValues, commitFieldValues, commitFieldValues, concatenateFieldFullLengthValues, concatenateFieldValues, containsField, copy, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonUsageIds, copyIntoRowFieldsWithGivenFieldNames, copyIntoRowFieldsWithGivenFieldNames, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, defaultMerge, delete, delete, delete, delete, deleteObject, divide, duplicateKey, equals, equals, equalsInstance, executeDistributedAction, fieldHasPossibleValuesSQLOperation, getAssociation, getAssociation, getAssociationByOperationUsageId, getAssociationOperation, getAttribute, getChildren, getColumnSpan, getCompleteRow, getCompleteRow, getConfigProperty, getCopiedFieldValues, getCSVRow, getCSVRow, getDatabaseRow, getDatabaseRow, getDeleteConfirmation, getDisplayValue, getDistributedRequestorURL, getExternalName, getExternalNames, getFDFData, getFDTable, getField, getField, getField, getFieldDefaultValue, getFieldDescriptor, getFieldDescriptor, getFieldDescriptor, getFieldDescriptorsWithUsage, getFieldDescriptorsWithUsageId, getFieldDescriptorWithUsageId, getFieldDisplayValue, getFieldNames, getFields, getFields, getFieldSets, getFieldSQLObject, getFieldsToDisplay, getFieldsToDisplayStrict, getFieldsToDisplayStrict, getFieldStyleClass, getFieldValue, getFieldWithUsageId, getHeaderText, getLibraryName, getMaxFieldLengths, getMaxFieldLengths, getMaxInsertRetries, getMetaDataSystemAlias, getNamed, getNamesOfUpdatedFields, getNavigationKey, getNavigationListKey, getPercentage, getPhysicalFieldNames, getPropertyGroup, getPropertyGroups, getPropertyGroups, getRowCollection, getRowDisplayAttributes, getRowDisplayAttributes, getRowKey, getSQL, getSQLContext, getStaticAttribute, getSum, getSystemAlias, getTable, getTable, getTableName, getTables, getTimestamp, getUpdatedFields, getUserMessageForOperation, getUseWOWLibrary, getValidationExceptions, getValueAsBoolean, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsNumber, getValueAsShort, getValueAsString, getValueAsString, getValueByUsageId, getValues, getXMLData, getXMLData, getXMLHeaderData, handleDistributed, hasChildRows, hasMultipleStyleClasses, hasPropertyChangeListeners, insert, insert, insert, is, isARow, isARowCollection, isChanged, isChangedRealTime, isChangedSinceLastCheck, isCloneNeeded, isContainsAllFields, isCopyable, isDeletable, isDistinctRow, isDistributed, isEditable, isEmpty, isFieldApplicable, isFieldAuthorizedForEdit, isFieldAuthorizedForRead, isFieldDisplayable, isFieldReadOnly, isFieldRequired, isFieldRequiredOnSearch, isFieldsChanged, isFieldValueNotBlank, isFieldValuesDatabaseDefaults, isGenerateChildRows, isGroupByRow, isGuarded, isHasColumnNames, isInARowCollection, isIncrementorResetAfterMaxInsertRetries, isInitializeDerivedFieldsEnabled, isJoinedRow, isKeyFieldsPresent, isLogicalRow, isMultipleDeleteEnabled, isPhysicalRow, isPropertyChangeEventsEnabled, isReturningFromPossibleValuesSearch, isRowKeyed, isSelectable, isUnionRow, isValidateRequired, isValidationRequiredForAutoPopulate, isViewable, iterator, merge, newField, newField, newField, newField, populate, postCreate, prepareForDetails, prepareFromFieldNames, removeNavigationKey, removePropertyChangeListener, removePropertyChangeListener, removeRowEventListener, removeRowEventListeners, replaceField, replaceFieldValues, rollbackChanges, setAttribute, setDistributed, setDistributedRequestorURL, setDistributedTargetURL, setFieldInitialValue, setFieldValue, setFieldValue, setFieldValueAsString, setFieldValueAsString, setFieldValuesAsDate, setFieldValuesToDefault, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonUsageIds, setFieldValueToDefault, setMultipleDeleteEnabled, setNavigationKey, setPropertyChangeEventsEnabled, setPropertyGroups, setReturningFromPossibleValuesSearch, setSavepoint, setSavepoint, setSavepoint, setStaticAttribute, setTables, setTables, setUseWOWLibrary, setValidateRequired, setValues, size, splitAndSetFieldValues, statusChanged, toCSV, toDOC, toDOC, toFDF, toPDF, toPDF, toString, toUpperCase, toXML, transferDataTo, update, update, update, updateObject, validate, validate, validateRowOperation
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_PREFIX

public static final String NAME_PREFIX
See Also:
Constant Field Values
Constructor Detail

TableDescriptor

public TableDescriptor()
Method Detail

createTableDescriptor

public static TableDescriptor createTableDescriptor(Table targetTable)
                                             throws CMException
Creates a new TableDescriptor object for a Table

CMException

getTableDescriptorName

public static final String getTableDescriptorName(Table t)
Gets the name of a TableDescriptor based on a table


insert

public int insert(SQLContext context)
           throws CMException
Inserts this Row into the specified database.

Overrides:
insert in class FieldDescriptorRow
Returns:
The number of Rows that were inserted
CMException

isPhysical

public boolean isPhysical()
Tests if this field descriptor describes a field that is physically present in the database

Overrides:
isPhysical in class FieldDescriptorRow

setName

public void setName(Table t)
             throws CMException
Sets the name of this TableDescriptor from a table

CMException

getJavaFieldClass

public Class getJavaFieldClass()
                        throws CMException
Gets the class to instantiate for this field. For example, a char field from the database may actually be created as a EMailField or PhoneField. Giving fields more intellience and behavior. If no field class has been configured in the FieldData for this field just use the basic SQL type.

Overrides:
getJavaFieldClass in class FieldDescriptorRow
Returns:
The Class object which should be used to instantiate a field for this FD. Null may be returned if no appropriat Class can be determined.
Throws:
CMException - If a class name was entered, but does not correspond to a Java class

getTableDescriptorName

public static final String getTableDescriptorName(String tableName)
Gets the name of a TableDescriptor based on a table name


update

public int update(Connection conn,
                  ExecutingContext ec)
           throws CMException
Description copied from class: Row
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Overrides:
update in class FieldDescriptorRow
Returns:
The number of updated rows
CMException