org.datanucleus.store.mapped.identifier
Class JPOXIdentifierFactory

java.lang.Object
  extended by org.datanucleus.store.mapped.identifier.AbstractIdentifierFactory
      extended by org.datanucleus.store.mapped.identifier.DNIdentifierFactory
          extended by org.datanucleus.store.mapped.identifier.JPOXIdentifierFactory
All Implemented Interfaces:
IdentifierFactory

public class JPOXIdentifierFactory
extends DNIdentifierFactory


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.identifier.DNIdentifierFactory
tablePrefix, tableSuffix
 
Fields inherited from class org.datanucleus.store.mapped.identifier.AbstractIdentifierFactory
candidates, CASE_LOWER, CASE_PRESERVE, CASE_UPPER, clr, columns, dba, defaultCatalogName, defaultSchemaName, foreignkeys, identifierCase, indexes, LOCALISER, primarykeys, quoteString, rdba, references, sequences, tables, wordSeparator
 
Constructor Summary
JPOXIdentifierFactory(DatastoreAdapter dba, ClassLoaderResolver clr, java.util.Map props)
           
 
Method Summary
protected  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 org.datanucleus.store.mapped.identifier.DNIdentifierFactory
generateIdentifierNameForJavaName, getColumnIdentifierSuffix, newAdapterIndexFieldIdentifier, newDatastoreContainerIdentifier, newDatastoreContainerIdentifier, newDiscriminatorFieldIdentifier, newForeignKeyFieldIdentifier, newIndexFieldIdentifier, newJoinTableFieldIdentifier, newReferenceFieldIdentifier, newVersionFieldIdentifier
 
Methods inherited from class org.datanucleus.store.mapped.identifier.AbstractIdentifierFactory
getDatastoreAdapter, getIdentifierCase, getIdentifierInAdapterCase, getIdentifierNamePartsFromName, getWordSeparator, newCandidateKeyIdentifier, newDatastoreContainerIdentifier, newDatastoreFieldIdentifier, newDatastoreFieldIdentifier, newForeignKeyIdentifier, newIdentifier, newIdentifier, newIndexIdentifier, newPrimaryKeyIdentifier, newSequenceIdentifier, setCatalogSchemaForTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPOXIdentifierFactory

public JPOXIdentifierFactory(DatastoreAdapter dba,
                             ClassLoaderResolver clr,
                             java.util.Map props)
Method Detail

truncate

protected java.lang.String truncate(java.lang.String identifier,
                                    int length)
Method to truncate an identifier to fit within the specified identifier length. If truncation is necessary will use a 2 char hashcode (at the end) to attempt to create uniqueness.

Overrides:
truncate in class AbstractIdentifierFactory
Parameters:
identifier - The identifier
length - The (max) length to use
Returns:
The truncated identifier.


Copyright © 2010. All Rights Reserved.