atg.adapter.gsa
Class GSAPropertyDescriptor

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by atg.beans.SerializableFeatureDescriptor
          extended by atg.beans.DynamicPropertyDescriptor
              extended by atg.repository.RepositoryPropertyDescriptor
                  extended by atg.adapter.gsa.GSAPropertyDescriptor
All Implemented Interfaces:
atg.adapter.gsa.Constants, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
ChildFoldersPropertyDescriptor, SearchTestsPropertyDescriptor

public class GSAPropertyDescriptor
extends RepositoryPropertyDescriptor
implements java.io.Serializable, atg.adapter.gsa.Constants, java.lang.Cloneable, java.lang.Comparable

GSA property definition. Each GSAItemDescriptor can have one or more of these.

See Also:
GSARepository, Serialized Form

Field Summary
static int ARRAY
           
static int BIG_STRING
           
static int BINARY
           
static int BOOLEAN
           
static int BYTE
           
static java.lang.String CLASS_VERSION
          Class version string
static int DATE
           
static int DOUBLE
           
static int ENUMERATED
           
static int ENUMERATED_STRING
           
static int FLOAT
           
static int GSAID
           
static int INT
           
static int INVALID_DATA_TYPE
           
static int LIST
           
static int LONG
           
static int MAP
           
protected  boolean mMapSub
          Convenience method for retrieving mapsub property status.
protected  atg.core.jdbc.ResultSetGetter[] mResultSetGetters
           
static int SET
           
static int SHORT
           
static int STRING
          Values for the DataType property
static int TIMESTAMP
           
 
Fields inherited from class atg.repository.RepositoryPropertyDescriptor
EMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, mCollectionOrMap
 
Fields inherited from class atg.beans.DynamicPropertyDescriptor
PORTABLE_VALUE_KEY
 
Fields inherited from class atg.beans.SerializableFeatureDescriptor
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME
 
Fields inherited from interface atg.adapter.gsa.Constants
ATTR_CASCADE_DELETE_ORDER, ATTR_CSW_PROPERTIES, ATTR_CSW_QUERIES, ATTR_CURRENT_ITEM_CACHE_SIZE, ATTR_CURRENT_ITEM_CACHE_TIMEOUT, ATTR_DEFAULT_UNCACHED_ITEM_QUERIES, ATTR_HEAD_OF_LINE_CACHE_SIZE, ATTR_HEAD_OF_LINE_CACHE_TIMEOUT, ATTR_LOADING_STRATEGY, ATTR_SPLIT_QUERIES, ATTR_TEXT_HANDLE_COLUMN, ATTR_TEXT_INDEX_TABLE, ATTR_UPDATE_LAST_MODIFIED, CASCADE_DELETE_AFTER_AUX_BEFORE_PRI, CASCADE_DELETE_FIRST, CASCADE_DELETE_LAST, CASCADE_DELETE_ORDER_NAMES, DEFAULT_EVENT_SERVER, DEFAULT_GSA_CACHE_CLIENT_MANAGER, DEFAULT_INVALIDATOR_SERVICE, ERR_ADD_MISSING_PROPERTIES, ERR_ADD_NON_TRANSIENT, ERR_ARGS_FOR_NON_PARAMETER_QUERY, ERR_BAD_EVENT_DATA, ERR_BAD_TABLE, ERR_CACHE_LOCALITY_MODE_CONFLICT, ERR_CIRCULAR_REFERENCE, ERR_CLASS_NOT_FOUND, ERR_COMPARE_MULTI, ERR_COMPARE_NONCOMPARABLE, ERR_CONTENT_PROPERTIES_NOT_DEFINED, ERR_COULD_NOT_UNSUBSCRIBE, ERR_DEPENDENT_PROP_NOT_EXISTS, ERR_DEPENDENT_PROP_NULL, ERR_DS_PREPARE, ERR_DS_SWITCH, ERR_DUPLICATES, ERR_FOLDER_PROPERTIES_NOT_DEFINED, ERR_HANDLING_INVALIDATE_CACHE_ENTRY, ERR_ID_SPACE_CONFIGURATION, ERR_ILLEGAL_PARAM_TYPE, ERR_INITIALIZING_ID_GENERATOR, ERR_INVALID_COMPARISON_QUERY, ERR_INVALID_DATA_TYPE_NAME, ERR_INVALID_ITEM, ERR_INVALID_ITEM_DESCRIPTOR_NAME, ERR_INVALID_KEY, ERR_INVALID_KEY_ELEMENT, ERR_INVALID_KEY_ENCODING, ERR_INVALID_KEY_VALUES, ERR_INVALID_LIST_INDEX, ERR_INVALID_PATTERNMATCH_QUERY, ERR_INVALID_PROPERTY, ERR_INVALID_QUERY, ERR_INVALID_QUERY_ELEMENT, ERR_INVALID_TEXT_SEARCH_QUERY, ERR_INVALID_TM_DS_COMBO, ERR_ITEM_NOT_EXIST, ERR_LOAD_COLUMN_INFO, ERR_MISSING_ID_SPACE, ERR_NO_ARGS_FOR_QUERY, ERR_NO_DATABASE_TABLE_INFO, ERR_NO_DATATYPE_FOR_PROPERTY, ERR_NO_DB2_HANDLE, ERR_NO_DEFAULT_SEARCH_PROPERTIES, ERR_NO_EVENT_SERVER, ERR_NO_IDS, ERR_NO_LOWER_FUNCTION, ERR_NO_PARAMETER_EXPRESSION, ERR_NO_PARSER, ERR_NO_PRIMARY_TABLE, ERR_NO_SUB_PROPERTIES, ERR_NO_SUBSCRIBER_ITEM_DESCRIPTOR, ERR_NO_SYB_TEXT_INDEX, ERR_NO_TEMPLATE_FILES, ERR_NO_TRANSACTION, ERR_NO_TRANSIENT_QUERIES, ERR_NOT_DISTRIBUTED_MODE, ERR_NULL_ARGUMENT, ERR_NULL_ID, ERR_NULL_ITEM, ERR_NULL_QUERY_OPTIONS, ERR_PARSING_TEMPLATE, ERR_PROCEDURE_HELPER_INIT, ERR_PROPERTY_NOT_QUERYABLE, ERR_RETURN_PROP_NOT_EXISTS, ERR_RETURN_PROP_NOT_GSA, ERR_RETURN_PROP_NOT_READ, ERR_RETURN_PROP_NULL, ERR_RQL_FILTER, ERR_SQL_STRING_NULL, ERR_SUB_TYPE_PROPERTY_ON_NON_ROOT_TYPE, ERR_TABLE_KEY_UNMATCHED, ERR_TRANSACTION, ERR_TYPE_MATCHING, ERR_UNABLE_TO_READ_TEMPLATE_FILE, ERR_UNKNOWN_EVENT_TYPE, ERR_VERSION_PROPERTY_INVALID_TYPE, ERR_VIEW_IS_TRANSIENT, ERR_WRONG_NUMBER_ARGS_FOR_QUERY, FTS_LANG_DB2, FTS_LANG_MSSQL, FTS_LANG_MSSQL_INLINE, FTS_LANG_ORACLE, FTS_LANG_SYBASE, INFO_STARTUP_BEGIN, INFO_STARTUP_END, ISOLATION_LEVEL_NAMES, LOADING_STRATEGY_DEFAULT, LOADING_STRATEGY_EAGER, LOADING_STRATEGY_LAZY, READ_COMMITTED, REPEATABLE_READ, REPOSITORY_COMPONENT_NAME, RESOURCE_BUNDLE_NAME, SERIALIZABLE, SUBSCRIBER_ADDRESS_PROPERTY, SUBSCRIBER_ITEM_DESCRIPTOR_NAME, SUBSCRIBER_ITEM_DESCRIPTOR_PROPERTY, SUBSCRIBER_PORT_PROPERTY, SUBSCRIBER_REPOSITORY_PROPERTY, WARN_PROBLEM_SENDING_EVENT, WARN_RETURN_PROP_MULTI, WARN_RETURN_PROP_TRANSIENT
 
Constructor Summary
GSAPropertyDescriptor()
          Empty constructor
 
Method Summary
 int compareTo(GSAPropertyDescriptor pOther)
          Compare this property descriptor to another property descriptor.
 int compareTo(java.lang.Object pOther)
          Compare this descriptor to another object.
 java.beans.PropertyEditor createDBPropertyEditor()
          This is a property editor which always converts values to/from the database version of the property.
 boolean equals(java.lang.Object pOther)
          Compare this object to the specified object.
 boolean getAllowNullValues()
          When it allowNullValues is false on a multi-valued property, null values are silently stripped, and saving a null value will result in an error.
 java.lang.String getCacheMode()
           
 boolean getCacheReferencesById()
           
 int getColumnCount()
          Get property ColumnCount
 java.lang.String[] getColumnNames()
          Get property ColumnNames
 java.lang.Class getComponentPropertyType()
           
static int getDataTypeByClass(java.lang.Class pClass)
          Return the type value for a given class.
static int getDataTypeByName(java.lang.String pName)
          Return the type value for a given name.
static java.lang.Class getDataTypeClass(int pType)
           
static java.lang.String getDataTypeName(int pType)
           
static java.lang.String getDataTypeNameFromClass(java.lang.Class pClass)
           
 int[] getDataTypes()
           
 java.lang.String getErrorCode()
          Do some error checking on this property descriptor.
 java.lang.String getGroup()
           
 GSAPropertyDescriptor[] getGroupProperties()
           
 java.lang.String getHandleColumn()
          Get property handleColumn
 int getId()
          Get property Id
 int[] getIdPartIndices()
          Get property IdPartIndex.
 int[] getJDBCColumnLengths()
          Get property JDBCColumnLengths These are the lengths of character or numeric columns as reported by JDBC.
 java.lang.String[] getJDBCPrimaryKeyNames()
          Get property JDBCPrimaryKeyNames These are the names of the primary key associated with the column(s) in which this property is stored.
static int getJDBCTypeByName(java.lang.String pName)
          Return the jdbc type value for a given name.
static java.lang.String getJDBCTypeName(int pType)
           
 int[] getJDBCTypes()
          Get property JDBCTypes
 boolean getJDBCTypesKnown()
          Get property JDBCTypesKnown
 java.lang.String getLoadingStrategy()
          Get property loadingStrategy
 java.util.ResourceBundle getLocalizedResourceBundle()
          Override the getResourceBundle method which is used to localize values for this property descriptor to the user's locale.
 GSAPropertyDescriptor getManyToOneIdProperty()
           
 GSAPropertyDescriptor getManyToOneMultiProperty()
           
 java.lang.Object getPropertyValue(RepositoryItemImpl pItem, java.lang.Object pValue)
          This method is called to retrieve a read-only value for this property.
 GSAPropertyDescriptor getReciprocalProperty()
          Returns true if the property has a reciprocal property from another item descriptor
 boolean getRemoveNullValues()
           
 Repository getRepository()
          Get property Repository.
 java.util.ResourceBundle getResourceBundle()
          Override the getResourceBundle method which is used to localize values for this property descriptor to the server locale.
 atg.core.jdbc.ResultSetGetter[] getResultSetGetters()
          Get property resultSetGetter.
 GSAPropertyDescriptor[] getReverseReferenceProperties()
          Returns the property or properties that reverse this reference.
 atg.adapter.gsa.Table getTable()
          Get property Table
 atg.adapter.gsa.Table getTextIndexTable()
          Get property textIndexTable
 java.lang.String getTypeName()
          Returns the name of this type for use in the data-type attribute
static java.lang.String getTypeSQL(atg.adapter.gsa.DatabaseTableInfo pDatabaseTableInfo, int pDataType, int pLength)
          Returns the name of this type for use in the data-type attribute
 java.lang.Object getUnmodifiableDefaultValue()
          Returns property UnmodifiableDefaultValue
 java.lang.Object getValue(java.lang.String pName)
          Retrieve a named attribute with this feature.
 int hashCode()
          Get a hashcode for this object
 boolean hasReciprocalProperty()
          Returns true if the property has a reciprocal property from another item descriptor
 boolean isComposite()
          Get property Composite.
 boolean isDefaultProperty()
          Test property defaultProperty
 boolean isGSAId()
           
 boolean isInherited()
           
 boolean isInternallyWritable()
           
 boolean isJDBCColumnLengthsKnown()
          Returns true if the column length information for the columns of this property has been gathered already.
 boolean[] isJDBCPrimaryKey()
          Get property JDBCPrimaryKey These are the names of the primary key associated with the column(s) in which this property is stored.
 boolean isJDBCPrimaryKeyNamesKnown()
          Returns true if the column length information for the columns of this property has been gathered already.
 boolean isJDBCTypesKnown()
          Test property JDBCTypesKnown
 boolean isLoggingDebug()
          Check logging debug status
 boolean isLoggingError()
          Check logging error status
 boolean isLoggingWarning()
          Check logging warning status
 boolean isMapSub()
           
 boolean isMultiValued()
          Convenience method for retrieving multi valued status.
 boolean isProhibitDuplicates()
          Get property ProhibitDuplicates
 boolean isValidValue(java.lang.Object pPropertyValue)
          Returns true if the given property value is a valid value for this property, false otherwise.
 boolean isVersionable()
          Returns true if this property should be checked for versioning.
 void logDebug(java.lang.String pMsg)
          Log a debug message
 void logDebug(java.lang.String pMsg, int pLevel)
          Log a debug message
 void logError(java.lang.String pMsg)
          Log a error message
 void logError(java.lang.Throwable pThrowable)
          Log a error message
 void logWarning(java.lang.String pMsg)
          Log a warning message
 java.lang.Object rawToReal(java.lang.Object pRawValue)
          Translate a raw property value to a real value.
 java.lang.Object[] rawToReal(java.lang.Object[] pRawValues)
          This is the multi-object version of the rawToReal function.
 java.lang.Object[] rawToReal(java.lang.Object[] pRawValues, RepositoryItem pReferencingItem)
          This is the multi-object version of the rawToReal function.
 java.lang.Object realToRaw(java.lang.Object pRealValue)
          Translate a property value to a raw value.
 void setAllowNullValues(boolean pAllowNullValues)
          Sets the property allowNullValues.
 void setCacheMode(java.lang.String pCacheMode)
          Sets the property CacheMode.
 void setCacheReferencesById(boolean pCacheReferencesById)
          Sets the property CacheReferencesById.
 void setCascadeDelete(boolean pDelete)
          Sets the property CascadeDelete.
 void setCascadeInsert(boolean pInsert)
          Sets the property CascadeInsert.
 void setCascadeUpdate(boolean pUpdate)
          Sets the property CascadeUpdate.
 void setColumnNames(java.lang.String[] pColumnNames)
          Set property ColumnNames
 void setComponentPropertyType(java.lang.Class pComponentPropertyType)
          Sets the property ComponentPropertyType.
 void setDataTypes(int[] pDataTypes)
          Sets the property DataTypes.
 void setGroup(java.lang.String pGroup)
          Sets the property Group.
 void setGroupProperties(GSAPropertyDescriptor[] pGroupProperties)
          Sets the property GroupProperties.
 void setHandleColumn(java.lang.String pHandleColumn)
          Set property handleColumn
 void setId(int pId)
          Set property Id
 void setIdPartIndices(int[] pIdPartIndices)
          Set property IdPartIndices
 void setInherited(boolean pInherited)
          Sets the property Inherited.
 void setInternallyWritable(boolean pInternallyWritable)
          Sets the property InternallyWritable.
 void setJDBCColumnLengths(int[] pColumnLengths)
          Set property JDBCColumnLengths
 void setJDBCColumnLengthsKnown(boolean pKnown)
           
 void setJDBCPrimaryKey(boolean[] pPrimaryKey)
          Set property JDBCPrimaryKey
 void setJDBCPrimaryKeyNames(java.lang.String[] pPrimaryKeyNames)
          Set property JDBCPrimaryKeyNames
 void setJDBCPrimaryKeyNamesKnown(boolean pKnown)
           
 void setJDBCTypes(int[] pJDBCTypes)
          Set property JDBCTypes
 void setJDBCTypesByName(java.lang.String pNames)
          Sets the list of JDBC types via a String with "," separated values if there is more than one.
 void setJDBCTypesKnown(boolean pJDBCTypesKnown)
          Set property JDBCTypesKnown
 void setLoadingStrategy(java.lang.String pLoadingStrategy)
          Set property loadingStrategy
 void setManyToOneIdProperty(GSAPropertyDescriptor pManyToOneIdProperty)
          Sets the property ManyToOneIdProperty.
 void setManyToOneMultiProperty(GSAPropertyDescriptor pManyToOneMultiProperty)
          Sets the property ManyToOneMultiProperty.
 void setProhibitDuplicates(boolean pProhibitDuplicates)
          Set prohibitDuplicates
 void setPropertyValue(RepositoryItemImpl pItem, java.lang.Object pValue)
          Sets the property of this type for the item descriptor provided.
 void setRemoveNullValues(boolean pRemoveNullValues)
          Sets the property RemoveNullValues.
 void setTable(atg.adapter.gsa.Table pTable)
          Set property Table.
 void setTextIndexTable(atg.adapter.gsa.Table pTextIndexTable)
          Set property textIndexTable
 void setValue(java.lang.String pAttributeName, java.lang.Object pValue)
          Associate a named attribute with this feature.
 atg.adapter.gsa.GSAId toGSAId(java.lang.Object pValue)
          Convert the value to a GSAId using the correct descriptor
 atg.adapter.gsa.GSAId toGSAId(java.lang.Object pValue, boolean pReversed)
          Convert the value to a GSAId using the correct descriptor
 java.lang.String toString()
          Return a string representation of this object
 void updatePropertyDescriptor()
          This method gets called when all of the property descriptor's properties have been set.
 
Methods inherited from class atg.repository.RepositoryPropertyDescriptor
clone, createPropertyDescriptorFromType, getCascadeDelete, getCascadeInsert, getCascadeUpdate, getComponentItemDescriptor, getComponentPropertyBeanInfo, getDefaultValue, getDefaultValueString, getItemDescriptor, getPropertyBeanInfo, getPropertyItemDescriptor, getResourceBundleName, isAssignableFrom, isCacheable, isCollectionOrMap, isDerived, isIdProperty, isIgnoreNullValue, isPersistent, isQueryable, isVersionableSet, registerPropertyDescriptorClass, setCacheable, setComponentItemDescriptor, setDefaultValue, setDefaultValueString, setDerived, setIdProperty, setIgnoreNullValue, setItemDescriptor, setLoggingDebug, setPersistent, setPropertyItemDescriptor, setPropertyType, setQueryable, setResourceBundleName, setVersionable
 
Methods inherited from class atg.beans.DynamicPropertyDescriptor
createLocalePropertyEditor, createLocalePropertyEditor, createPropertyEditor, getPropertyEditorClass, getPropertyType, getUIPropertyEditor, isReadable, isRequired, isWritable, setPropertyEditorClass, setReadable, setRequired, setWritable
 
Methods inherited from class atg.beans.SerializableFeatureDescriptor
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getName, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

mResultSetGetters

protected transient atg.core.jdbc.ResultSetGetter[] mResultSetGetters

mMapSub

protected boolean mMapSub
Convenience method for retrieving mapsub property status.


STRING

public static final int STRING
Values for the DataType property

See Also:
Constant Field Values

BIG_STRING

public static final int BIG_STRING
See Also:
Constant Field Values

DATE

public static final int DATE
See Also:
Constant Field Values

ENUMERATED

public static final int ENUMERATED
See Also:
Constant Field Values

ENUMERATED_STRING

public static final int ENUMERATED_STRING
See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

BINARY

public static final int BINARY
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

TIMESTAMP

public static final int TIMESTAMP
See Also:
Constant Field Values

ARRAY

public static final int ARRAY
See Also:
Constant Field Values

SET

public static final int SET
See Also:
Constant Field Values

LIST

public static final int LIST
See Also:
Constant Field Values

MAP

public static final int MAP
See Also:
Constant Field Values

GSAID

public static final int GSAID
See Also:
Constant Field Values

INVALID_DATA_TYPE

public static final int INVALID_DATA_TYPE
See Also:
Constant Field Values
Constructor Detail

GSAPropertyDescriptor

public GSAPropertyDescriptor()
Empty constructor

Method Detail

setId

public void setId(int pId)
Set property Id

Parameters:
pId - new value to set

getId

public int getId()
Get property Id

Returns:
Id

setComponentPropertyType

public void setComponentPropertyType(java.lang.Class pComponentPropertyType)
Sets the property ComponentPropertyType. When we are an array of an other item, our component's class is a the repository item class.

Overrides:
setComponentPropertyType in class DynamicPropertyDescriptor
Parameters:
pComponentPropertyType - new value to set

getComponentPropertyType

public java.lang.Class getComponentPropertyType()
Overrides:
getComponentPropertyType in class DynamicPropertyDescriptor
Returns:
The value of the property ComponentPropertyType.

isDefaultProperty

public boolean isDefaultProperty()
Test property defaultProperty

Returns:
defaultProperty

setProhibitDuplicates

public void setProhibitDuplicates(boolean pProhibitDuplicates)
Set prohibitDuplicates

Parameters:
pProhibitDuplicates - new value to set

isProhibitDuplicates

public boolean isProhibitDuplicates()
Get property ProhibitDuplicates

Returns:
prohibitDuplicates

hasReciprocalProperty

public boolean hasReciprocalProperty()
Returns true if the property has a reciprocal property from another item descriptor


getReciprocalProperty

public GSAPropertyDescriptor getReciprocalProperty()
Returns true if the property has a reciprocal property from another item descriptor


isValidValue

public boolean isValidValue(java.lang.Object pPropertyValue)
Returns true if the given property value is a valid value for this property, false otherwise. Uses the super classes implementation to verify that the value matches the property type, then if we have an item type, we must make sure that the value is of the correct type.

Overrides:
isValidValue in class RepositoryPropertyDescriptor

setPropertyValue

public void setPropertyValue(RepositoryItemImpl pItem,
                             java.lang.Object pValue)
Sets the property of this type for the item descriptor provided.

Overrides:
setPropertyValue in class RepositoryPropertyDescriptor

isVersionable

public boolean isVersionable()
Returns true if this property should be checked for versioning.

Overrides:
isVersionable in class RepositoryPropertyDescriptor
Returns:
The value of the property Versionable.

rawToReal

public java.lang.Object[] rawToReal(java.lang.Object[] pRawValues)
This is the multi-object version of the rawToReal function.

Parameters:
pRawValues - for a property
Returns:
Real values to use in applications for the property. Note that return values in the array can be null, and that return array sequencing will mimic argument array sequencing. Will return null due to any failures or if null is passed in.

rawToReal

public java.lang.Object[] rawToReal(java.lang.Object[] pRawValues,
                                    RepositoryItem pReferencingItem)
This is the multi-object version of the rawToReal function.

Parameters:
pRawValues - for a property
pReferencingItem - the item that contains the property the raw values came from
Returns:
Real values to use in applications for the property. Note that return values in the array can be null, and that return array sequencing will mimic argument array sequencing. Will return null due to any failures or if null is passed in.

rawToReal

public java.lang.Object rawToReal(java.lang.Object pRawValue)
Translate a raw property value to a real value. The real value is what applications use. The raw value is what is stored in the DB.

Parameters:
pRawValue - for a property
Returns:
real value to use in applications for the property

realToRaw

public java.lang.Object realToRaw(java.lang.Object pRealValue)
Translate a property value to a raw value. The real value is what applications use. The raw value is what is stored in the DB.

Parameters:
pRealValue - for a property
Returns:
raw value for storing this property in the DB

createDBPropertyEditor

public java.beans.PropertyEditor createDBPropertyEditor()
This is a property editor which always converts values to/from the database version of the property. If you get values directly from the database and want to convert them into "string" values, you can use this property editor.


getPropertyValue

public java.lang.Object getPropertyValue(RepositoryItemImpl pItem,
                                         java.lang.Object pValue)
This method is called to retrieve a read-only value for this property. Once a repository has computed the value it would like to return for this property, this property descriptor gets a chance to modify it based on how the property is defined. For example, if null is to be returned, we return the default value.

Overrides:
getPropertyValue in class RepositoryPropertyDescriptor
Parameters:
pItem - the RepositoryItemImpl for this property
pValue - the value to be returned for this property
Returns:
a default value if null. Otherwise the collections List, Set, and Map are all wrapped by ChangeAwareList, ChangeAwareSet, and ChangeAwareMap respectively if they haven't already been wrapped.

getRepository

public Repository getRepository()
Get property Repository.

Returns:
Repository

setTable

public void setTable(atg.adapter.gsa.Table pTable)
Set property Table. This property is null for transient properties.

Parameters:
pTable - new value to set

getTable

public atg.adapter.gsa.Table getTable()
Get property Table

Returns:
Table

setTextIndexTable

public void setTextIndexTable(atg.adapter.gsa.Table pTextIndexTable)
Set property textIndexTable

Parameters:
pTextIndexTable - new value to set

getTextIndexTable

public atg.adapter.gsa.Table getTextIndexTable()
Get property textIndexTable

Returns:
textIndexTable

setHandleColumn

public void setHandleColumn(java.lang.String pHandleColumn)
Set property handleColumn

Parameters:
pHandleColumn - new value to set

getHandleColumn

public java.lang.String getHandleColumn()
Get property handleColumn

Returns:
HandleColumn

setColumnNames

public void setColumnNames(java.lang.String[] pColumnNames)
Set property ColumnNames

Parameters:
pColumnNames - new value to set

getColumnNames

public java.lang.String[] getColumnNames()
Get property ColumnNames

Returns:
ColumnNames

getColumnCount

public int getColumnCount()
Get property ColumnCount

Returns:
ColumnCount

isComposite

public boolean isComposite()
Get property Composite.

Returns:
true if Composite

isGSAId

public boolean isGSAId()

getIdPartIndices

public int[] getIdPartIndices()
Get property IdPartIndex.

Returns:
Array of 0-based indices to the Id components this property descriptor represents if it is a part of a composite key

setIdPartIndices

public void setIdPartIndices(int[] pIdPartIndices)
Set property IdPartIndices

Parameters:
pIdPartIndices - new value to set

toGSAId

public atg.adapter.gsa.GSAId toGSAId(java.lang.Object pValue)
Convert the value to a GSAId using the correct descriptor

Parameters:
could - be an encoded GSAId, String, Integer or Long or an array
Returns:
GSAId Id representing values

toGSAId

public atg.adapter.gsa.GSAId toGSAId(java.lang.Object pValue,
                                     boolean pReversed)
Convert the value to a GSAId using the correct descriptor

Parameters:
could - be an encoded GSAId, String, Integer or Long or an array
Returns:
GSAId Id representing values

setDataTypes

public void setDataTypes(int[] pDataTypes)
Sets the property DataTypes.

Parameters:
pDataTypes - new value to set

getDataTypes

public int[] getDataTypes()
Returns:
The value of the property DataTypes.

isJDBCPrimaryKey

public boolean[] isJDBCPrimaryKey()
Get property JDBCPrimaryKey These are the names of the primary key associated with the column(s) in which this property is stored.

Returns:

setJDBCPrimaryKey

public void setJDBCPrimaryKey(boolean[] pPrimaryKey)
Set property JDBCPrimaryKey

Parameters:
pJDBCTypes - new value to set

getJDBCPrimaryKeyNames

public java.lang.String[] getJDBCPrimaryKeyNames()
Get property JDBCPrimaryKeyNames These are the names of the primary key associated with the column(s) in which this property is stored.

Returns:

setJDBCPrimaryKeyNames

public void setJDBCPrimaryKeyNames(java.lang.String[] pPrimaryKeyNames)
Set property JDBCPrimaryKeyNames

Parameters:
pJDBCTypes - new value to set

isJDBCPrimaryKeyNamesKnown

public boolean isJDBCPrimaryKeyNamesKnown()
Returns true if the column length information for the columns of this property has been gathered already.

Returns:

setJDBCPrimaryKeyNamesKnown

public void setJDBCPrimaryKeyNamesKnown(boolean pKnown)

getJDBCColumnLengths

public int[] getJDBCColumnLengths()
Get property JDBCColumnLengths These are the lengths of character or numeric columns as reported by JDBC.

Returns:

setJDBCColumnLengths

public void setJDBCColumnLengths(int[] pColumnLengths)
Set property JDBCColumnLengths

Parameters:
pJDBCTypes - new value to set

isJDBCColumnLengthsKnown

public boolean isJDBCColumnLengthsKnown()
Returns true if the column length information for the columns of this property has been gathered already.

Returns:

setJDBCColumnLengthsKnown

public void setJDBCColumnLengthsKnown(boolean pKnown)

setJDBCTypes

public void setJDBCTypes(int[] pJDBCTypes)
Set property JDBCTypes

Parameters:
pJDBCTypes - new value to set

getJDBCTypes

public int[] getJDBCTypes()
Get property JDBCTypes

Returns:
JDBCTypes

setJDBCTypesByName

public void setJDBCTypesByName(java.lang.String pNames)
Sets the list of JDBC types via a String with "," separated values if there is more than one.


setJDBCTypesKnown

public void setJDBCTypesKnown(boolean pJDBCTypesKnown)
Set property JDBCTypesKnown

Parameters:
pJDBCTypeKnown - new value to set

getJDBCTypesKnown

public boolean getJDBCTypesKnown()
Get property JDBCTypesKnown

Returns:
JDBCTypeKnown

isJDBCTypesKnown

public boolean isJDBCTypesKnown()
Test property JDBCTypesKnown

Returns:
JDBCTypesKnown

getTypeName

public java.lang.String getTypeName()
Returns the name of this type for use in the data-type attribute

Overrides:
getTypeName in class RepositoryPropertyDescriptor

getTypeSQL

public static java.lang.String getTypeSQL(atg.adapter.gsa.DatabaseTableInfo pDatabaseTableInfo,
                                          int pDataType,
                                          int pLength)
Returns the name of this type for use in the data-type attribute


setCacheMode

public void setCacheMode(java.lang.String pCacheMode)
Sets the property CacheMode.

Parameters:
pCacheMode - new value to set

getCacheMode

public java.lang.String getCacheMode()
Returns:
The value of the property CacheMode.

setGroupProperties

public void setGroupProperties(GSAPropertyDescriptor[] pGroupProperties)
Sets the property GroupProperties.

Parameters:
pGroupProperties - new value to set

getGroupProperties

public GSAPropertyDescriptor[] getGroupProperties()
Returns:
The value of the property GroupProperties.

setGroup

public void setGroup(java.lang.String pGroup)
Sets the property Group.

Parameters:
pGroup - new value to set

getGroup

public java.lang.String getGroup()
Returns:
The value of the property Group. Only properties with tables have groups defined for them.

getResultSetGetters

public atg.core.jdbc.ResultSetGetter[] getResultSetGetters()
Get property resultSetGetter. Derived property for now.

Returns:
Array of resultSetGetter

isMultiValued

public boolean isMultiValued()
Convenience method for retrieving multi valued status.

Overrides:
isMultiValued in class RepositoryPropertyDescriptor

isMapSub

public boolean isMapSub()

setInternallyWritable

public void setInternallyWritable(boolean pInternallyWritable)
Sets the property InternallyWritable. Is this property suitable for writting during an item cloning operation.

Parameters:
pInternallyWritable - new value to set

isInternallyWritable

public boolean isInternallyWritable()
Returns:
The value of the property InternallyWritable.

setInherited

public void setInherited(boolean pInherited)
Sets the property Inherited. Did this property come from another item descriptor?

Parameters:
pInherited - new value to set

isInherited

public boolean isInherited()
Returns:
The value of the property Inherited.

setCascadeInsert

public void setCascadeInsert(boolean pInsert)
Description copied from class: RepositoryPropertyDescriptor
Sets the property CascadeInsert. If this is true on a property that refers to another item, the create operation will automatically create a new item in the referenced repository and set the value of this property to it. Typically this should be used in conjunction with CascadeUpdate so that this value gets added and updated at the same time as well. The default is false. You cannot set this to true for properties which do not refer to other items.

Overrides:
setCascadeInsert in class RepositoryPropertyDescriptor
Parameters:
pInsert - new value to set

setCascadeUpdate

public void setCascadeUpdate(boolean pUpdate)
Description copied from class: RepositoryPropertyDescriptor
Sets the property CascadeUpdate. If this is true on a property that refers to another item (or items), the add and update operations apply recursively to the referenced item (or items). More specifically, setting this property to true on a property descriptor changes the behavior of the system in the following ways: The default is false. You cannot set this to true for properties which do not refer to other items.

Overrides:
setCascadeUpdate in class RepositoryPropertyDescriptor
Parameters:
pUpdate - new value to set

setCascadeDelete

public void setCascadeDelete(boolean pDelete)
Description copied from class: RepositoryPropertyDescriptor
Sets the property CascadeDelete. If this is true on a property that refers to another item (or items), the remove operation applies recursively to the referenced item (or items). More specifically, setting this property to true on a property descriptor changes the behavior of the system in the following ways: The default is false. You cannot set this to true for properties which do not refer to other items.

Overrides:
setCascadeDelete in class RepositoryPropertyDescriptor
Parameters:
pDelete - new value to set

getDataTypeByName

public static int getDataTypeByName(java.lang.String pName)
Return the type value for a given name.


getDataTypeByClass

public static int getDataTypeByClass(java.lang.Class pClass)
Return the type value for a given class.


getDataTypeClass

public static java.lang.Class getDataTypeClass(int pType)

getDataTypeName

public static java.lang.String getDataTypeName(int pType)

getDataTypeNameFromClass

public static java.lang.String getDataTypeNameFromClass(java.lang.Class pClass)

getJDBCTypeByName

public static int getJDBCTypeByName(java.lang.String pName)
Return the jdbc type value for a given name.


getJDBCTypeName

public static java.lang.String getJDBCTypeName(int pType)

toString

public java.lang.String toString()
Return a string representation of this object

Overrides:
toString in class RepositoryPropertyDescriptor
Returns:
a string representation of this object

hashCode

public int hashCode()
Get a hashcode for this object

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode

equals

public boolean equals(java.lang.Object pOther)
Compare this object to the specified object.

Overrides:
equals in class java.lang.Object
Returns:
true if the other object is not null, of the same class, and has the same if, else false

compareTo

public int compareTo(java.lang.Object pOther)
Compare this descriptor to another object. If the other object is also a property descriptor, this method behaves like compareTo(GSAPropertyDescriptor), otherwise it throws ClassCastException as property descriptors are only comparable to other property descriptors.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
pOther - object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified item descriptor

compareTo

public int compareTo(GSAPropertyDescriptor pOther)
Compare this property descriptor to another property descriptor. The result is the result of comparing the ids of the two descriptors.

Parameters:
pOther - object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified property descriptor

getErrorCode

public java.lang.String getErrorCode()
Do some error checking on this property descriptor.


setValue

public void setValue(java.lang.String pAttributeName,
                     java.lang.Object pValue)
Associate a named attribute with this feature.

Overrides:
setValue in class RepositoryPropertyDescriptor
Parameters:
attributeName - The locale-independent name of the attribute
value - The value.

getUnmodifiableDefaultValue

public java.lang.Object getUnmodifiableDefaultValue()
Description copied from class: RepositoryPropertyDescriptor
Returns property UnmodifiableDefaultValue

Overrides:
getUnmodifiableDefaultValue in class RepositoryPropertyDescriptor

getValue

public java.lang.Object getValue(java.lang.String pName)
Retrieve a named attribute with this feature. This particular method implicitly defines the serialize attribute if we are defined without a table. This way, transient properties will get serialized with the item (unless someone explicitly marks them with serialize=false).

Overrides:
getValue in class java.beans.FeatureDescriptor
Parameters:
attributeName - The locale-independent name of the attribute
Returns:
The value of the attribute. May be null if the attribute is unknown.

updatePropertyDescriptor

public void updatePropertyDescriptor()
This method gets called when all of the property descriptor's properties have been set. It does computation of some precomputed values


getLocalizedResourceBundle

public java.util.ResourceBundle getLocalizedResourceBundle()
Override the getResourceBundle method which is used to localize values for this property descriptor to the user's locale. First check for a bundle on the property, then the table, then the item-descriptor.

Overrides:
getLocalizedResourceBundle in class RepositoryPropertyDescriptor

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Override the getResourceBundle method which is used to localize values for this property descriptor to the server locale. First check for a bundle on the property, then the table, then the item-descriptor.

Overrides:
getResourceBundle in class RepositoryPropertyDescriptor

getReverseReferenceProperties

public GSAPropertyDescriptor[] getReverseReferenceProperties()
Returns the property or properties that reverse this reference. Returns null if this is a non-RepositoryItem reference or there is no reversing property, or if this property references a non-GSA repository.


setManyToOneIdProperty

public void setManyToOneIdProperty(GSAPropertyDescriptor pManyToOneIdProperty)
Sets the property ManyToOneIdProperty. If this property is the src of a many to one relationship, we need to treat this property specially. This property contains the property descriptor of the destination id property for the relationship. When this property gets modified (i.e. an item gets added or removed from it), we need to do some special things:

Parameters:
pManyToOneIdProperty - new value to set

getManyToOneIdProperty

public GSAPropertyDescriptor getManyToOneIdProperty()
Returns:
The value of the property ManyToOneIdProperty.

setManyToOneMultiProperty

public void setManyToOneMultiProperty(GSAPropertyDescriptor pManyToOneMultiProperty)
Sets the property ManyToOneMultiProperty.

Parameters:
pManyToOneMultiProperty - new value to set

getManyToOneMultiProperty

public GSAPropertyDescriptor getManyToOneMultiProperty()
Returns:
The value of the property ManyToOneMultiProperty.

setRemoveNullValues

public void setRemoveNullValues(boolean pRemoveNullValues)
Sets the property RemoveNullValues. This gets set via the feature descriptor attribute of the same name. When it is true on a multi-valued property, any null values in that property are automatically removed from the bean representation (and when the property is modified, the updated table also has these values removed).

Parameters:
pRemoveNullValues - new value to set

getRemoveNullValues

public boolean getRemoveNullValues()
Returns:
The value of the property RemoveNullValues.

setAllowNullValues

public void setAllowNullValues(boolean pAllowNullValues)
Sets the property allowNullValues. This gets set via the feature descriptor attribute of the same name. When it is false on a multi-valued property, null values are silently stripped, and saving a null value will result in an error.

Parameters:
pAllowNullValues - new value to set

getAllowNullValues

public boolean getAllowNullValues()
When it allowNullValues is false on a multi-valued property, null values are silently stripped, and saving a null value will result in an error.

Returns:
The value of the property allowNullValues.

setCacheReferencesById

public void setCacheReferencesById(boolean pCacheReferencesById)
Sets the property CacheReferencesById. If this is a set on an item descriptor, we cache item ids not items directly. This can be used to reduce the number of items cached (i.e. a referencing item will not implicitly hold onto all referenced items). It also is used by the version repository to ensure that references are always returned pointing to the correct item (in case a new item is added to a workspace when we are caching the version of the item on the branch for example).

Parameters:
pCacheReferencesById - new value to set

getCacheReferencesById

public boolean getCacheReferencesById()
Returns:
The value of the property CacheReferencesById.

setLoadingStrategy

public void setLoadingStrategy(java.lang.String pLoadingStrategy)
Set property loadingStrategy

Parameters:
pLoadingStrategy - new value to set

getLoadingStrategy

public java.lang.String getLoadingStrategy()
Get property loadingStrategy

Returns:
loadingStrategy

logDebug

public void logDebug(java.lang.String pMsg)
Log a debug message


logDebug

public void logDebug(java.lang.String pMsg,
                     int pLevel)
Log a debug message


logWarning

public void logWarning(java.lang.String pMsg)
Log a warning message


logError

public void logError(java.lang.String pMsg)
Log a error message


logError

public void logError(java.lang.Throwable pThrowable)
Log a error message


isLoggingDebug

public boolean isLoggingDebug()
Check logging debug status

Overrides:
isLoggingDebug in class RepositoryPropertyDescriptor
Returns:
The value of the property LoggingDebug.

isLoggingWarning

public boolean isLoggingWarning()
Check logging warning status


isLoggingError

public boolean isLoggingError()
Check logging error status