Purpose: EclipseLink 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 behavior 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 representation.
Every descriptor is initialized with the following information:
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.
DescriptorEventManager, DescriptorQueryManager, InheritancePolicy, InterfacePolicy
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addTableName(String tableName)
Overrides org. |
| public String | getTableName()
Overrides org. |
| public Vector | getTableNames()
Overrides org. |
| public boolean | isRelationalDescriptor()
Overrides org. |
| public void | setDefaultTableName(String defaultTableName)
Overrides org. |
| public void | setTableName(String tableName)
Overrides org. |
| public void | setTableNames(Vector<E> tableNames)
Overrides org. |
| public void | setTableQualifier(String tableQualifier)
Overrides org. |
| RelationalDescriptor | back to summary |
|---|---|
| public RelationalDescriptor() PUBLIC: Return a new descriptor. | |
| addTableName | back to summary |
|---|---|
| public void addTableName(String tableName) Overrides org. PUBLIC: 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.
| |
| getTableName | back to summary |
|---|---|
| public String getTableName() Overrides org. PUBLIC: Return the name of the descriptor's first table. This method must only be called on single table descriptors.
| |
| getTableNames | back to summary |
|---|---|
| public Vector Overrides org. PUBLIC: Return the table names.
| |
| isRelationalDescriptor | back to summary |
|---|---|
| public boolean isRelationalDescriptor() Overrides org. PUBLIC: Return if the descriptor maps to a relational table.
| |
| setDefaultTableName | back to summary |
|---|---|
| public void setDefaultTableName(String defaultTableName) Overrides org. PUBLIC: The descriptors default table can be configured if the first table is not desired.
| |
| setTableName | back to summary |
|---|---|
| public void setTableName(String tableName) throws DescriptorException Overrides org. PUBLIC: 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.
| |
| setTableNames | back to summary |
|---|---|
| public void setTableNames(Vector<E> tableNames) Overrides org. PUBLIC: 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
| |
| setTableQualifier | back to summary |
|---|---|
| public void setTableQualifier(String tableQualifier) Overrides org. PUBLIC: Set the table Qualifier for this descriptor. This table creator will be used for all tables in this descriptor
| |