|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.AbstractIdentifierFactory
public abstract class AbstractIdentifierFactory
Abstract representation of an identifier factory. To be extended to generate the identifiers.
| Field Summary | |
|---|---|
static int |
CASE_LOWER
|
static int |
CASE_PRESERVE
|
static int |
CASE_UPPER
|
protected DatastoreAdapter |
dba
Adapter for the datastore. |
protected int |
identifierCase
Case to use for identifiers. |
protected static Localiser |
LOCALISER
Localiser for messages. |
| 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 |
| Constructor Summary | |
|---|---|
AbstractIdentifierFactory(DatastoreAdapter dba,
java.lang.String requiredCase)
Constructor. |
|
| Method Summary | |
|---|---|
DatastoreAdapter |
getDatastoreAdapter()
Accessor for the datastore adapter that we are creating identifiers for. |
int |
getIdentifierCase()
Accessor for the identifier case being used. |
protected abstract int |
getMaxLengthForIdentifierType(int identifierType)
Method to return the maximum permitted length of an identifier of the specified type. |
java.lang.String |
getNameOfIdentifierCase()
Convenience method to return the name for the identifier case. |
protected static java.lang.String |
truncate(java.lang.String identifier,
int length)
Method to truncate an identifier to fit within the specified identifier length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
public static final int CASE_PRESERVE
public static final int CASE_UPPER
public static final int CASE_LOWER
protected DatastoreAdapter dba
protected int identifierCase
| Constructor Detail |
|---|
public AbstractIdentifierFactory(DatastoreAdapter dba,
java.lang.String requiredCase)
dba - Datastore adapterrequiredCase - The case the user requires| Method Detail |
|---|
public DatastoreAdapter getDatastoreAdapter()
getDatastoreAdapter in interface IdentifierFactorypublic int getIdentifierCase()
getIdentifierCase in interface IdentifierFactorypublic java.lang.String getNameOfIdentifierCase()
getNameOfIdentifierCase in interface IdentifierFactory
protected static java.lang.String truncate(java.lang.String identifier,
int length)
identifier - The identifierlength - The (max) length to use
protected abstract int getMaxLengthForIdentifierType(int identifierType)
identifierType - Type of identifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||