org.jpox.store.rdbms.sqlidentifier
Interface RDBMSIdentifierFactory

All Superinterfaces:
IdentifierFactory
All Known Implementing Classes:
AbstractRDBMSIdentifierFactory, JPAIdentifierFactory, JPOX2IdentifierFactory, JPOXIdentifierFactory

public interface RDBMSIdentifierFactory
extends IdentifierFactory

Extension of the IdentifierFactory to allow for identifiers specific to RDBMS datastores.

Version:
$Revision: 1.19 $

Field Summary
 
Fields inherited from interface org.jpox.store.IdentifierFactory
CANDIDATE_KEY, COLUMN, FOREIGN_KEY, IDENTIFIER_LOWER_CASE, IDENTIFIER_LOWER_CASE_QUOTED, IDENTIFIER_MIXED_CASE, IDENTIFIER_MIXED_CASE_QUOTED, IDENTIFIER_UPPER_CASE, IDENTIFIER_UPPER_CASE_QUOTED, INDEX, PRIMARY_KEY, SEQUENCE, TABLE
 
Method Summary
 DatastoreIdentifier newAdapterIndexFieldIdentifier()
          Method to return an identifier for an adapter index datastore field.
 DatastoreIdentifier newCandidateKeyIdentifier(DatastoreContainerObject table, int seq)
          Method to generate an identifier for a candidate key.
 DatastoreIdentifier newForeignKeyFieldIdentifier(AbstractPropertyMetaData ownerFmd, AbstractPropertyMetaData relatedFmd, DatastoreIdentifier destinationId, boolean embedded, int fieldRole)
          Method to generate a FK/FK-index field identifier.
 DatastoreIdentifier newForeignKeyIdentifier(DatastoreContainerObject table, int seq)
          Method to create an identifier for a foreign key.
 DatastoreIdentifier newIndexFieldIdentifier()
          Method to return an identifier for an index datastore field.
 DatastoreIdentifier newIndexIdentifier(DatastoreContainerObject table, boolean isUnique, int seq)
          Method to generate an identifier for an index.
 DatastoreIdentifier newJoinTableFieldIdentifier(AbstractPropertyMetaData ownerFmd, AbstractPropertyMetaData relatedFmd, DatastoreIdentifier destinationId, boolean embedded, int fieldRole)
          Method to generate a join-table identifier.
 DatastoreIdentifier newPrimaryKeyIdentifier(DatastoreContainerObject table)
          Method to generate an identifier for a primary key.
 DatastoreIdentifier newSequenceIdentifier(java.lang.String sequenceName)
          Method to generate an identifier for a sequence using the passed name.
 
Methods inherited from interface org.jpox.store.IdentifierFactory
getDatastoreAdapter, getIdentifierCase, getIdentifierInAdapterCase, getNameOfIdentifierCase, newDatastoreContainerIdentifier, newDatastoreContainerIdentifier, newDatastoreContainerIdentifier, newDatastoreFieldIdentifier, newDatastoreFieldIdentifier, newDiscriminatorFieldIdentifier, newIdentifier, newIdentifier, newReferenceFieldIdentifier, newVersionFieldIdentifier
 

Method Detail

newJoinTableFieldIdentifier

DatastoreIdentifier newJoinTableFieldIdentifier(AbstractPropertyMetaData ownerFmd,
                                                AbstractPropertyMetaData relatedFmd,
                                                DatastoreIdentifier destinationId,
                                                boolean embedded,
                                                int fieldRole)
Method to generate a join-table identifier. The identifier could be for a foreign-key to another table (if the destinationId is provided), or could be for a simple column in the join table.

Parameters:
ownerFmd - MetaData for the owner field
relatedFmd - MetaData for the related field (if bidirectional)
destinationId - Identifier for the identity field of the destination table
embedded - Whether the identifier is for a field embedded
fieldRole - The role to be performed by this column e.g FK, collection element ?
Returns:
The identifier.

newForeignKeyFieldIdentifier

DatastoreIdentifier newForeignKeyFieldIdentifier(AbstractPropertyMetaData ownerFmd,
                                                 AbstractPropertyMetaData relatedFmd,
                                                 DatastoreIdentifier destinationId,
                                                 boolean embedded,
                                                 int fieldRole)
Method to generate a FK/FK-index field identifier. The identifier could be for the FK field itself, or for a related index for the FK.

Parameters:
ownerFmd - MetaData for the owner field
relatedFmd - MetaData for the related field (if bidirectional)
destinationId - Identifier for the identity field of the destination table (if strict FK)
embedded - Whether the identifier is for a field embedded
fieldRole - The role to be performed by this column e.g owner, index ?
Returns:
The identifier

newIndexFieldIdentifier

DatastoreIdentifier newIndexFieldIdentifier()
Method to return an identifier for an index datastore field.

Returns:
The index datastore field identifier

newAdapterIndexFieldIdentifier

DatastoreIdentifier newAdapterIndexFieldIdentifier()
Method to return an identifier for an adapter index datastore field. An "adapter index" is a column added to be part of a primary key when some other column cant perform that role.

Returns:
The index datastore field identifier

newSequenceIdentifier

DatastoreIdentifier newSequenceIdentifier(java.lang.String sequenceName)
Method to generate an identifier for a sequence using the passed name.

Parameters:
sequenceName - the name of the sequence to use
Returns:
The DatastoreIdentifier

newPrimaryKeyIdentifier

DatastoreIdentifier newPrimaryKeyIdentifier(DatastoreContainerObject table)
Method to generate an identifier for a primary key.

Parameters:
table - the table
Returns:
The DatastoreIdentifier

newIndexIdentifier

DatastoreIdentifier newIndexIdentifier(DatastoreContainerObject table,
                                       boolean isUnique,
                                       int seq)
Method to generate an identifier for an index.

Parameters:
table - the table
isUnique - if the index is unique
seq - the sequential number
Returns:
The DatastoreIdentifier

newCandidateKeyIdentifier

DatastoreIdentifier newCandidateKeyIdentifier(DatastoreContainerObject table,
                                              int seq)
Method to generate an identifier for a candidate key.

Parameters:
table - the table
seq - Sequence number
Returns:
The DatastoreIdentifier

newForeignKeyIdentifier

DatastoreIdentifier newForeignKeyIdentifier(DatastoreContainerObject table,
                                            int seq)
Method to create an identifier for a foreign key.

Parameters:
table - the table
seq - the sequential number
Returns:
The DatastoreIdentifier


Copyright © -2008 . All Rights Reserved.