planetj.dataengine
Class PropertyRow

java.lang.Object
  extended byplanetj.database.Row
      extended byplanetj.dataengine.PropertyRow
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, IBatchProcessObject, IBusinessObject, ICSVRow, IFDFObject, IGuarded, INamedCollection, INavigationObject, IRowCreator, IXMLObject, java.io.Serializable
Direct Known Subclasses:
Application, Operation, Theme

public abstract class PropertyRow
extends Row
implements java.io.Serializable, java.lang.Cloneable

A PropertyRow is simply a Row that has a Field that contains PropertyGroups representing properties of the Row.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.database.Row
Row.SpacingRow
 
Field Summary
 
Fields inherited from class planetj.database.Row
className, DISPLAY_ORDER_COMPARATOR, MODE_ALTER, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, mRowEventListeners
 
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
PropertyRow()
           
 
Method Summary
 Row createRow(Row row)
          Initializes this PropertyRow as it is retrieved from the database.
 java.lang.String getProperties()
          Gets the propert String associated with this Row.
abstract  java.lang.String getPropertyFieldName()
          Get the name of the Field containing this Row's properties..
 PropertyGroup getRowPropertyGroup(java.lang.String groupName)
          Gets the first PropertyGroup with the given property group name.
 PropertyGroupList getRowPropertyGroups()
          Gets the property group objects associated with this PropertyRow.
 java.util.List getRowPropertyGroups(java.lang.String groupName)
          Get this PropertyRow's property groups with the given group name.
 int insert(SQLContext context)
          Inserts this Row into the specified database.
 void setProperties(java.lang.String properties)
          Sets the property string associated with this PropertyRow.
protected  void setPropertiesInternal(java.lang.String properties)
          Sets the property string associated with this PropertyRow.
protected  void setRowPropertyGroups(PropertyGroupList propertyGroups)
          Sets the PropertyGroups associated with this PropertyRow.
protected  void setRowPropertyGroupsInternal(PropertyGroupList propertyGroups)
          Sets the PropertyGroups associated with this PropertyRow.
 Row transferDataTo(Row pDestinationRow)
          Transfers all the data in this Row into a different Row.
protected  void transferPropertiesTo(PropertyRow pDestinationRow)
          Transfers the property group info from this row into another PropertyRow.
 int update(java.sql.Connection conn, ExecutingContext ec)
          Updates the database with the values in this Row.
 
Methods inherited from class planetj.database.Row
add, add, addObject, addPropertyChangeListener, addPropertyChangeListener, addRowEventListener, addRowEventListeners, addTable, addToRowCollection, 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, create, create, create, create, createAction, createNamedActionRequest, createSQLContextForDelete, createSQLContextForInsert, createSQLContextForUpdate, dataTransferred, defaultMerge, delete, delete, delete, delete, deleteObject, divide, duplicateKey, duplicateKey, enforceExclusiveOr, equals, equals, equalsInstance, fieldHasPossibleValuesSQLOperation, firePropertyChange, fireRowEvent, getActionDefaultLocation, getActionDescriptor, getActionRequest, getActionRequest, getActions, getActionsForFields, getActionsForOperation, getAssociation, getAssociation, getAssociationByOperationUsageId, getAssociationOperation, getAttribute, getAutoIncrementDatabaseDrivenField, getBackgroundColor, getChangedFields, getChildren, getColumnSpan, getCompleteRow, getCompleteRow, getConcurrentFields, getConfigProperty, getCopiedFieldValues, getCreationContext, getCSVRow, getCSVRow, getDatabaseRow, getDatabaseRow, getDatabaseRow, getDatabaseRow, getDBSystem, getDeleteConfirmation, getDeleteConfirmationMessage, getDisjointRowClass, getDisplayValue, getDisplayValueByUsageId, getDisplayValueForKey, getErrorMessageForOperation, getExternalName, getExternalNames, getFDFData, getFDTable, getField, getField, getField, getFieldAssociationOperation, getFieldCollection, getFieldDefaultValue, getFieldDescriptor, getFieldDescriptor, getFieldDescriptor, getFieldDescriptorsWithUsage, getFieldDescriptorsWithUsageId, getFieldDescriptorWithUsageId, getFieldDisplayComponent, getFieldDisplayOrder, getFieldDisplayValue, getFieldDisplayValue, getFieldExternalName, getFieldFieldClassParameters, getFieldFieldSetName, getFieldIncrementor, getFieldMaxLength, getFieldNames, getFieldNames, getFieldPossibleValues, getFields, getFields, getFieldSearchDefaultValue, getFieldSets, getFieldsForInsert, getFieldSQLObject, getFieldStatusChange, getFieldsToDisplay, getFieldsToDisplayStrict, getFieldsToDisplayStrict, getFieldStyleClass, getFieldsWithUsageId, getFieldUsageIds, getFieldValue, getFieldValueWithUsageId, getFieldWithUsageId, getHeaderText, getHorizontalAlignment, getJSPFor, getKeyFieldNames, getKeyFields, getKeyFields, getLibraryName, getMaxFieldLengths, getMaxFieldLengths, getMaxInsertRetries, getMetaDataSystemAlias, getNamed, getNamed, getNamesOfUpdatedFields, getNavigationKey, getNavigationListKey, getNextOperationToRun, getOperation, getOperation, getOperationFromDB, getOperationFromDBByUsage, getPercentage, getPhysicalFieldNames, getPossibleValueClass, getPossibleValueClass, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPropertyChangeSupport, getPropertyGroup, getPropertyGroups, getPropertyGroups, getReplacementFieldsToDisplay, getReplacementFieldsToDisplay, getRequiredFields, getRow, getRowCollection, getRowDisplayAttributes, getRowDisplayAttributes, getRowHandledActionNames, getRowKey, getSecuredTypeId, getSecuredTypeName, getSecurityType, getSQL, getSQLContext, getStaticAttribute, getStaticAttributes, getSum, getSystemAlias, getTabbedOperation, getTable, getTable, getTableName, getTables, getTimestamp, getUpdatedFields, getUserMessageForOperation, getUserMessageForOperation, getUseWOWLibrary, getValidationExceptions, getValueAsBoolean, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsNumber, getValueAsShort, getValueAsString, getValueAsString, getValueAsStringByUsageId, getValueByUsageId, getValueForKey, getValues, getXMLData, getXMLData, getXMLHeaderData, goToNextOperation, handleAction, hasAssociationOperation, hasChildRows, hasMultipleStyleClasses, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPropertyChangeListeners, incrementFieldValue, initializeRow, initializeRow, initializeRow, initializeRow, initializeRow, initializeRow, insert, insert, insert, is, isActionApplicable, isActionRepeatable, isARow, isARowCollection, isChanged, isChanged, isChangedRealTime, isChangedSinceLastCheck, isCloneNeeded, isContainsAllFields, isCopyable, isCurrent, isDeletable, isDistinctRow, isEditable, isEmpty, isFieldApplicable, isFieldAuthorizedForEdit, isFieldAuthorizedForRead, isFieldAutoIncrement, isFieldAutoIncrementDatabaseDriven, isFieldAutoIncrementWOWDriven, isFieldDisplayable, isFieldPresent, isFieldReadOnly, isFieldReadOnlyOnSearch, isFieldRequired, isFieldRequiredOnSearch, isFieldsChanged, isFieldUpdateable, isFieldValueNotBlank, isFieldValuePossibleValue, isFieldValuesDatabaseDefaults, isGenerateChildRows, isGroupByRow, isGuarded, isHasColumnNames, isInARowCollection, isIncrementorResetAfterMaxInsertRetries, isInitializeDerivedFieldEnabled, isInitializeDerivedFieldsEnabled, isJoinedRow, isKeyFieldsPresent, isLogicalRow, isMultipleDeleteEnabled, isParameterRow, isPersistent, isPhysicalRow, isPrepareFieldValue, isPropertyChangeEventsEnabled, isReturningFromPossibleValuesSearch, isRowDisplayable, isRowKeyed, isSelectable, isStatusChange, isToBeSelected, isUnionRow, isUpdateable, isUseRowForFieldSets, isValidateDerivedFields, isValidateRequired, isValidationRequiredForAutoPopulate, isViewable, iterator, joinedDatabaseAccessFailure, joinedDelete, joinedDelete, joinedInsert, joinedInsert, joinedUpdate, joinedUpdate, merge, newField, newField, newField, newField, openFor, persist, populate, populate, populate, populateFD, postCreate, postDelete, postExtract, postInsert, postInsert, postUpdate, postUpdate, preDelete, preInsert, prepareForDetails, prepareForParameters, prepareForResultsDisplay, prepareFromFieldNames, preUpdate, removeField, removeField, removeNavigationKey, removePropertyChangeListener, removePropertyChangeListener, removeRowEventListener, removeRowEventListeners, replaceField, replaceFields, replaceFieldValues, replaceNumbersWithNames, reread, rereadIfNeeded, resetDisplayValues, rollbackChanges, runSQLQuery, runSQLQuery, runSQLStatement, runSQLStatement, setAttribute, setAutoUpdateFieldValues, setCreationContext, setCreationOperation, setFieldInitialValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValueAsString, setFieldValueAsString, setFieldValuesAsDate, setFieldValuesToDefault, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonUsageIds, setFieldValueToDefault, setMultipleDeleteEnabled, setNavigationKey, setParameterRow, setPersistent, setPropertyChangeEventsEnabled, setPropertyGroups, setReturningFromPossibleValuesSearch, setRowDisplayAttributes, setSavepoint, setSavepoint, setSavepoint, setStaticAttribute, setTables, setTables, setUseWOWLibrary, setValidateDerivedFields, setValidateRequired, setValues, size, splitAndSetFieldValues, statusChanged, swapFieldValues, toCSV, toDOC, toDOC, toFDF, toPDF, toPDF, toString, toUpperCase, toXML, transferDataTo, update, update, update, updateFieldValues, updateGlobalValues, updateObject, validate, validate, validate, validateField, validateRowOperation
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyRow

public PropertyRow()
Method Detail

createRow

public Row createRow(Row row)
              throws CMException
Initializes this PropertyRow as it is retrieved from the database. Any subclasses should call this method in the super class.

Specified by:
createRow in interface IRowCreator
Overrides:
createRow in class Row
Parameters:
row - A Row containing data read from the database (it will always be equal to this)
Returns:
A Row which the DataEngine will add to a RowCollection
Throws:
CMException

getProperties

public java.lang.String getProperties()
Gets the propert String associated with this Row.


getPropertyFieldName

public abstract java.lang.String getPropertyFieldName()
Get the name of the Field containing this Row's properties..


getRowPropertyGroup

public PropertyGroup getRowPropertyGroup(java.lang.String groupName)
Gets the first PropertyGroup with the given property group name.


getRowPropertyGroups

public PropertyGroupList getRowPropertyGroups()
Gets the property group objects associated with this PropertyRow. Any changes made to the PropertyGroupList or the PropertyGroups contained in that list will not be persisted - use the setRowPropertyGroups(PropertyGroupList) method to alter the list of PropertyGroups.


getRowPropertyGroups

public java.util.List getRowPropertyGroups(java.lang.String groupName)
Get this PropertyRow's property groups with the given group name.


insert

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

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

setProperties

public void setProperties(java.lang.String properties)
                   throws CMException
Sets the property string associated with this PropertyRow.

Throws:
CMException

setPropertiesInternal

protected void setPropertiesInternal(java.lang.String properties)
                              throws CMException
Sets the property string associated with this PropertyRow. This method does not alter the value of the property field

Throws:
CMException

setRowPropertyGroups

protected void setRowPropertyGroups(PropertyGroupList propertyGroups)
                             throws CMException
Sets the PropertyGroups associated with this PropertyRow. Invoking this method will alter the value of the property field

Throws:
CMException

setRowPropertyGroupsInternal

protected void setRowPropertyGroupsInternal(PropertyGroupList propertyGroups)
                                     throws CMException
Sets the PropertyGroups associated with this PropertyRow. Invoking this method will not update the value of the property field

Throws:
CMException

transferDataTo

public Row transferDataTo(Row pDestinationRow)
                   throws DataEngineException
Transfers all the data in this Row into a different Row. If this Row is part of one or more RowCollections, it is replaced in those RowCollections with the destination Row. This row will no longer contain any information after this method completes; any further operations involving this Row will fail or behave in unexpected ways. Note that property change listeners are removed from this Row, but are NOT transferred to the destination Row.

Overrides:
transferDataTo in class Row
Parameters:
pDestinationRow - The Row to copy the data to.
Returns:
The destination Row, containing the data from this Row.
Throws:
DataEngineException

transferPropertiesTo

protected void transferPropertiesTo(PropertyRow pDestinationRow)
                             throws DataEngineException
Transfers the property group info from this row into another PropertyRow. This method is invoked as part of the row creation process as a row is read from the DB and possibly transformed into a row of a different type. If the new type isn't a PropertyRow this method isn't invoked

Throws:
DataEngineException

update

public int update(java.sql.Connection conn,
                  ExecutingContext ec)
           throws CMException
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 Row
Parameters:
conn - The connection to use for the update
Returns:
The number of updated rows
Throws:
CMException