|
||||||||||
| 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.
| Field Summary | |
|---|---|
static int |
CANDIDATE_KEY
candidate key - unique index constraint |
static int |
COLUMN
column |
static int |
FOREIGN_KEY
foreign key |
static int |
IDENTIFIER_LOWER_CASE
Representation of an identifier specified in lower case. |
static int |
IDENTIFIER_LOWER_CASE_QUOTED
Representation of an identifier specified in "lower case" |
static int |
IDENTIFIER_MIXED_CASE
Representation of an identifier specified in Mixed Case. |
static int |
IDENTIFIER_MIXED_CASE_QUOTED
Representation of an identifier specified in "Mixed Case". |
static int |
IDENTIFIER_UPPER_CASE
Representation of an identifier specified in UPPER CASE |
static int |
IDENTIFIER_UPPER_CASE_QUOTED
Representation of an identifier specified in "UPPER CASE" |
static int |
INDEX
index |
static int |
PRIMARY_KEY
primary key |
static int |
SEQUENCE
identifier for datastore sequence. |
static int |
TABLE
identifier for table names |
| Method Summary | |
|---|---|
DatastoreAdapter |
getDatastoreAdapter()
Accessor for the datastore adapter that we are creating identifiers for. |
int |
getIdentifierCase()
Accessor for the identifier case being used. |
java.lang.String |
getIdentifierInAdapterCase(java.lang.String identifier)
Accessor for an identifier for use in the datastore adapter |
java.lang.String |
getNameOfIdentifierCase()
Convenience method to return the name for the identifier case. |
DatastoreIdentifier |
newDatastoreContainerIdentifier(ClassLoaderResolver clr,
AbstractClassMetaData md)
Method to return a Table identifier for the specified class. |
DatastoreIdentifier |
newDatastoreContainerIdentifier(ClassLoaderResolver clr,
AbstractPropertyMetaData fmd)
Method to return a Table identifier for the specified field. |
DatastoreIdentifier |
newDatastoreContainerIdentifier(java.lang.String identifierName)
Method to use to generate an identifier for a datastore field with the supplied name. |
DatastoreIdentifier |
newDatastoreFieldIdentifier(java.lang.String identifierName)
Method to use to generate an identifier for a datastore field with the supplied name. |
DatastoreIdentifier |
newDatastoreFieldIdentifier(java.lang.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 |
newIdentifier(DatastoreIdentifier identifier,
java.lang.String suffix)
Method to return a new Identifier based on the passed identifier, but adding on the passed suffix |
DatastoreIdentifier |
newIdentifier(int identifierType,
java.lang.String sqlIdentifier)
To be called when we want an identifier name creating based on the identifier. |
DatastoreIdentifier |
newReferenceFieldIdentifier(AbstractPropertyMetaData 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 |
newVersionFieldIdentifier()
Method to return an identifier for a version datastore field. |
| Field Detail |
|---|
static final int IDENTIFIER_UPPER_CASE
static final int IDENTIFIER_UPPER_CASE_QUOTED
static final int IDENTIFIER_LOWER_CASE
static final int IDENTIFIER_LOWER_CASE_QUOTED
static final int IDENTIFIER_MIXED_CASE
static final int IDENTIFIER_MIXED_CASE_QUOTED
static final int TABLE
static final int COLUMN
static final int FOREIGN_KEY
static final int INDEX
static final int CANDIDATE_KEY
static final int PRIMARY_KEY
static final int SEQUENCE
| Method Detail |
|---|
DatastoreAdapter getDatastoreAdapter()
int getIdentifierCase()
java.lang.String getNameOfIdentifierCase()
java.lang.String getIdentifierInAdapterCase(java.lang.String identifier)
identifier - The identifier name
DatastoreIdentifier newIdentifier(int identifierType,
java.lang.String sqlIdentifier)
identifierType - the type of identifier to be createdsqlIdentifier - The SQL identifier name
DatastoreIdentifier newDatastoreContainerIdentifier(java.lang.String identifierName)
identifierName - The identifier name
DatastoreIdentifier newDatastoreContainerIdentifier(ClassLoaderResolver clr,
AbstractClassMetaData md)
clr - the ClassLoaderResolvermd - Meta data for the class
DatastoreIdentifier newDatastoreContainerIdentifier(ClassLoaderResolver clr,
AbstractPropertyMetaData fmd)
clr - the ClassLoaderResolverfmd - Meta data for the field
DatastoreIdentifier newDatastoreFieldIdentifier(java.lang.String identifierName)
identifierName - The identifier name
DatastoreIdentifier newDatastoreFieldIdentifier(java.lang.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(AbstractPropertyMetaData refMetaData,
AbstractClassMetaData implMetaData,
DatastoreIdentifier implIdentifier,
boolean embedded,
int fieldRole)
refMetaData - the AbstractPropertyMetaData 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,
java.lang.String suffix)
identifier - The current identifiersuffix - The suffix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||