oracle.toplink.descriptors
Class RelationalDescriptor
java.lang.Object
oracle.toplink.descriptors.ClassDescriptor
oracle.toplink.descriptors.RelationalDescriptor
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- ObjectRelationalDescriptor
public class RelationalDescriptor
- extends ClassDescriptor
Purpose: TopLink has been designed to take advantage of the similarities between
relational databases and objects while accommodating for their differences, providing an object
oriented wrapper for relational databases. This is accomplished through the use of Descriptors.
A descriptor is a pure specification class with all its behaviour deputized to DescriptorEventManager,
DescriptorQueryManager and ObjectBuilder. Look at the following variables for the list
of specification on the descriptor.
A Descriptor is a set of mappings that describe how an objects's data is to be represented in a
relational database. It contains mappings from the class instance variables to the table's fields,
as well as the transformation routines necessary for storing and retrieving attributes. As such
the descriptor acts as the link between the Java object and its database representaiton.
Every descripor is initialized with the following information:
- The Java class its describes, and the corresponding table(s) for storing instances of the class.
- The primary key of the table.
- A list of query keys for field names.
- A description of the objects's attributes and relationships. This information is stored in mappings.
- A set of user selectable properties for tailoring the behaviour of the descriptor.
This descriptor subclass should be used for object-relational mapping,
and allows for other datatype mappings to be done in the XML, EIS and OR sibling classes.
- See Also:
DescriptorEventManager
,
DescriptorQueryManager
,
InheritancePolicy
,
InterfacePolicy
,
Serialized Form
Method Summary |
void |
addTableName(java.lang.String tableName)
Specify the table name for the class of objects the receiver describes. |
java.lang.String |
getTableName()
Return the name of the descriptor's first table. |
java.util.Vector |
getTableNames()
Return the table names. |
void |
setDefaultTableName(java.lang.String defaultTableName)
The descriptors default table can be configured if the first table is not desired. |
void |
setTableName(java.lang.String tableName)
Specify the table name for the class of objects the receiver describes. |
void |
setTableNames(java.util.Vector tableNames)
Specify the all table names for the class of objects the receiver describes. |
void |
setTableQualifier(java.lang.String tableQualifier)
Set the table Qualifier for this descriptor. |
Methods inherited from class oracle.toplink.descriptors.ClassDescriptor |
addAbstractQueryKey, addConstraintDependencies, addDirectMapping, addDirectMapping, addDirectQueryKey, addForeignKeyFieldForMultipleTable, addForeignKeyFieldNameForMultipleTable, addMapping, addMultipleTableForeignKeyField, addMultipleTableForeignKeyFieldName, addMultipleTablePrimaryKeyField, addMultipleTablePrimaryKeyFieldName, addPrimaryKeyField, addPrimaryKeyFieldName, addQueryKey, addTable, alwaysConformResultsInUnitOfWork, alwaysRefreshCache, alwaysRefreshCacheOnRemote, applyAmendmentMethod, createCopyPolicy, createInstantiationPolicy, descriptorIsAggregate, descriptorIsAggregateCollection, descriptorIsForInterface, descriptorIsNormal, disableCacheHits, disableCacheHitsOnRemote, dontAlwaysConformResultsInUnitOfWork, dontAlwaysRefreshCache, dontAlwaysRefreshCacheOnRemote, dontDisableCacheHits, dontDisableCacheHitsOnRemote, dontOnlyRefreshCacheIfNewerVersion, getAlias, getAmendmentClass, getAmendmentMethodName, getCacheInvalidationPolicy, getCacheSynchronizationType, getCMPPolicy, getConstraintDependencies, getDescriptorEventManager, getDescriptorInheritancePolicy, getDescriptorQueryManager, getDescriptorType, getEventManager, getFetchGroupManager, getHistoryPolicy, getIdentityMapSize, getInheritancePolicy, getInterfacePolicy, getJavaClass, getJavaClassName, getMappingForAttributeName, getMappings, getObjectChangePolicy, getOptimisticLockingPolicy, getPrimaryKeyFieldNames, getProperties, getProperty, getQueryKeys, getQueryManager, getRemoteIdentityMapSize, getReturningPolicy, getSequenceNumberFieldName, getSequenceNumberName, getUnitOfWorkCacheIsolationLevel, getWrapperPolicy, isAggregateCollectionDescriptor, isAggregateDescriptor, isChildDescriptor, isDescriptorForInterface, isIsolated, isNativeConnectionRequired, isObjectRelationalDescriptor, onlyRefreshCacheIfNewerVersion, removeMappingForAttributeName, removeProperty, setAlias, setAmendmentClass, setAmendmentMethodName, setCacheInvalidationPolicy, setCacheSynchronizationType, setCMPPolicy, setConstraintDependencies, setDescriptorType, setFetchGroupManager, setHistoryPolicy, setIdentityMapClass, setIdentityMapSize, setIsIsolated, setIsNativeConnectionRequired, setJavaClass, setJavaInterface, setMultipleTableInsertOrder, setObjectChangePolicy, setOptimisticLockingPolicy, setPrimaryKeyFieldName, setPrimaryKeyFieldNames, setProperty, setReadOnly, setRemoteIdentityMapClass, setRemoteIdentityMapSize, setReturningPolicy, setSequenceNumberFieldName, setSequenceNumberName, setShouldAlwaysConformResultsInUnitOfWork, setShouldAlwaysRefreshCache, setShouldAlwaysRefreshCacheOnRemote, setShouldBeReadOnly, setShouldDisableCacheHits, setShouldDisableCacheHitsOnRemote, setShouldOnlyRefreshCacheIfNewerVersion, setShouldOrderMappings, setUnitOfWorkCacheIsolationLevel, setWrapperPolicy, shouldAlwaysConformResultsInUnitOfWork, shouldAlwaysRefreshCache, shouldAlwaysRefreshCacheOnRemote, shouldBeReadOnly, shouldDisableCacheHits, shouldDisableCacheHitsOnRemote, shouldOnlyRefreshCacheIfNewerVersion, shouldUseCacheIdentityMap, shouldUseFullIdentityMap, shouldUseHardCacheWeakIdentityMap, shouldUseNoIdentityMap, shouldUseRemoteCacheIdentityMap, shouldUseRemoteFullIdentityMap, shouldUseRemoteHardCacheWeakIdentityMap, shouldUseRemoteNoIdentityMap, shouldUseRemoteSoftCacheWeakIdentityMap, shouldUseRemoteSoftIdentityMap, shouldUseRemoteWeakIdentityMap, shouldUseSoftCacheWeakIdentityMap, shouldUseSoftIdentityMap, shouldUseWeakIdentityMap, toString, useAllFieldsLocking, useCacheIdentityMap, useChangedFieldsLocking, useCloneCopyPolicy, useCloneCopyPolicy, useDefaultConstructorInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFactoryInstantiationPolicy, useFullIdentityMap, useHardCacheWeakIdentityMap, useInstantiationCopyPolicy, useMethodInstantiationPolicy, useNoIdentityMap, useRemoteCacheIdentityMap, useRemoteFullIdentityMap, useRemoteHardCacheWeakIdentityMap, useRemoteNoIdentityMap, useRemoteSoftCacheWeakIdentityMap, useRemoteSoftIdentityMap, useRemoteWeakIdentityMap, useSelectedFieldsLocking, useSoftCacheWeakIdentityMap, useSoftIdentityMap, usesOptimisticLocking, usesSequenceNumbers, usesVersionLocking, useTimestampLocking, useTimestampLocking, useVersionLocking, useVersionLocking, useWeakIdentityMap |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RelationalDescriptor
public RelationalDescriptor()
- Return a new descriptor.
addTableName
public void addTableName(java.lang.String tableName)
- Specify the table name for the class of objects the receiver describes.
If the table has a qualifier it should be specified using the dot notation,
(i.e. "userid.employee"). This method is used if there is more than one table.
- Overrides:
addTableName
in class ClassDescriptor
getTableName
public java.lang.String getTableName()
- Return the name of the descriptor's first table.
This method must only be called on single table descriptors.
- Overrides:
getTableName
in class ClassDescriptor
getTableNames
public java.util.Vector getTableNames()
- Return the table names.
- Overrides:
getTableNames
in class ClassDescriptor
setDefaultTableName
public void setDefaultTableName(java.lang.String defaultTableName)
- The descriptors default table can be configured if the first table is not desired.
- Overrides:
setDefaultTableName
in class ClassDescriptor
setTableName
public void setTableName(java.lang.String tableName)
throws DescriptorException
- Specify the table name for the class of objects the receiver describes.
If the table has a qualifier it should be specified using the dot notation,
(i.e. "userid.employee"). This method is used for single table.
- Overrides:
setTableName
in class ClassDescriptor
- Throws:
DescriptorException
setTableNames
public void setTableNames(java.util.Vector tableNames)
- Specify the all table names for the class of objects the receiver describes.
If the table has a qualifier it should be specified using the dot notation,
(i.e. "userid.employee"). This method is used for multiple tables
- Overrides:
setTableNames
in class ClassDescriptor
setTableQualifier
public void setTableQualifier(java.lang.String tableQualifier)
- Set the table Qualifier for this descriptor. This table creator will be used for
all tables in this descriptor
- Overrides:
setTableQualifier
in class ClassDescriptor