|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IdentifierFactory
Factory that creates immutable instances of DatastoreIdentifier. Identifiers are of a particular type. Each datastore could invent its own particular types as required, just that the ones here should be the principal types required.
| Method Summary | |
|---|---|
DatastoreAdapter |
getDatastoreAdapter()
Accessor for the datastore adapter that we are creating identifiers for. |
IdentifierCase |
getIdentifierCase()
Accessor for the identifier case being used. |
String |
getIdentifierInAdapterCase(String identifier)
Accessor for an identifier for use in the datastore adapter |
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 |
newDatastoreContainerIdentifier(AbstractClassMetaData md)
Method to return a Table identifier for the specified class. |
DatastoreIdentifier |
newDatastoreContainerIdentifier(AbstractMemberMetaData fmd)
Method to return a Table identifier for the specified field. |
DatastoreIdentifier |
newDatastoreContainerIdentifier(String identifierName)
Method to use to generate an identifier for a datastore field with the supplied name. |
DatastoreIdentifier |
newDatastoreFieldIdentifier(String identifierName)
Method to use to generate an identifier for a datastore field with the supplied name. |
DatastoreIdentifier |
newDatastoreFieldIdentifier(String javaName,
boolean embedded,
int fieldRole)
Method to create an identifier for a datastore field where we want the name based on the supplied java name, and the field has a particular role (and so could have its naming set according to the role). |
DatastoreIdentifier |
newDiscriminatorFieldIdentifier()
Method to return an identifier for a discriminator datastore field. |
DatastoreIdentifier |
newForeignKeyFieldIdentifier(AbstractMemberMetaData ownerFmd,
AbstractMemberMetaData 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 |
newIdentifier(DatastoreIdentifier identifier,
String suffix)
Method to return a new Identifier based on the passed identifier, but adding on the passed suffix |
DatastoreIdentifier |
newIdentifier(IdentifierType identifierType,
String identifierName)
To be called when we want an identifier name creating based on the identifier. |
DatastoreIdentifier |
newIndexFieldIdentifier(AbstractMemberMetaData mmd)
Method to return an identifier for an index (ordering) datastore field. |
DatastoreIdentifier |
newIndexIdentifier(DatastoreContainerObject table,
boolean isUnique,
int seq)
Method to generate an identifier for an index. |
DatastoreIdentifier |
newJoinTableFieldIdentifier(AbstractMemberMetaData ownerFmd,
AbstractMemberMetaData 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 |
newReferenceFieldIdentifier(AbstractMemberMetaData refMetaData,
AbstractClassMetaData implMetaData,
DatastoreIdentifier implIdentifier,
boolean embedded,
int fieldRole)
Method to generate an identifier name for reference field, based on the metadata for the field, and the ClassMetaData for the implementation. |
DatastoreIdentifier |
newSequenceIdentifier(String sequenceName)
Method to generate an identifier for a sequence using the passed name. |
DatastoreIdentifier |
newVersionFieldIdentifier()
Method to return an identifier for a version datastore field. |
| Method Detail |
|---|
DatastoreAdapter getDatastoreAdapter()
IdentifierCase getIdentifierCase()
String getIdentifierInAdapterCase(String identifier)
identifier - The identifier name
DatastoreIdentifier newIdentifier(IdentifierType identifierType,
String identifierName)
identifierType - the type of identifier to be createdidentifierName - The identifier name
DatastoreIdentifier newDatastoreContainerIdentifier(String identifierName)
identifierName - The identifier name
DatastoreIdentifier newDatastoreContainerIdentifier(AbstractClassMetaData md)
md - Meta data for the class
DatastoreIdentifier newDatastoreContainerIdentifier(AbstractMemberMetaData fmd)
fmd - Meta data for the field
DatastoreIdentifier newDatastoreFieldIdentifier(String identifierName)
identifierName - The identifier name
DatastoreIdentifier newDatastoreFieldIdentifier(String javaName,
boolean embedded,
int fieldRole)
javaName - The java field nameembedded - Whether the identifier is for a field embeddedfieldRole - The role to be performed by this column e.g FK, Index ?
DatastoreIdentifier newReferenceFieldIdentifier(AbstractMemberMetaData refMetaData,
AbstractClassMetaData implMetaData,
DatastoreIdentifier implIdentifier,
boolean embedded,
int fieldRole)
refMetaData - the MetaData for the reference fieldimplMetaData - the AbstractClassMetaData for this implementationimplIdentifier - PK identifier for the implementationembedded - Whether the identifier is for a field embeddedfieldRole - The role to be performed by this column e.g FK, collection element ?
DatastoreIdentifier newDiscriminatorFieldIdentifier()
DatastoreIdentifier newVersionFieldIdentifier()
DatastoreIdentifier newIdentifier(DatastoreIdentifier identifier,
String suffix)
identifier - The current identifiersuffix - The suffix
DatastoreIdentifier newJoinTableFieldIdentifier(AbstractMemberMetaData ownerFmd,
AbstractMemberMetaData relatedFmd,
DatastoreIdentifier destinationId,
boolean embedded,
int fieldRole)
ownerFmd - MetaData for the owner fieldrelatedFmd - MetaData for the related field (if bidirectional)destinationId - Identifier for the identity field of the destination tableembedded - Whether the identifier is for a field embeddedfieldRole - The role to be performed by this column e.g FK, collection element ?
DatastoreIdentifier newForeignKeyFieldIdentifier(AbstractMemberMetaData ownerFmd,
AbstractMemberMetaData relatedFmd,
DatastoreIdentifier destinationId,
boolean embedded,
int fieldRole)
ownerFmd - MetaData for the owner fieldrelatedFmd - 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 embeddedfieldRole - The role to be performed by this column e.g owner, index ?
DatastoreIdentifier newIndexFieldIdentifier(AbstractMemberMetaData mmd)
mmd - Metadata for the field/property that we require to add an index(order) column for
DatastoreIdentifier newAdapterIndexFieldIdentifier()
DatastoreIdentifier newSequenceIdentifier(String sequenceName)
sequenceName - the name of the sequence to use
DatastoreIdentifier newPrimaryKeyIdentifier(DatastoreContainerObject table)
table - the table
DatastoreIdentifier newIndexIdentifier(DatastoreContainerObject table,
boolean isUnique,
int seq)
table - the tableisUnique - if the index is uniqueseq - the sequential number
DatastoreIdentifier newCandidateKeyIdentifier(DatastoreContainerObject table,
int seq)
table - the tableseq - Sequence number
DatastoreIdentifier newForeignKeyIdentifier(DatastoreContainerObject table,
int seq)
table - the tableseq - the sequential number
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||