Class JPOXIdentifierFactory

All Implemented Interfaces:
IdentifierFactory

public class JPOXIdentifierFactory extends DNIdentifierFactory
Factory that creates immutable instances of DatastoreIdentifier for mapped datastores. Provides the "JPOX" naming strategy like with DNIdentifierFactory except this uses a consistent hashing process to match JPOX.
  • Field Details

    • HASH_RANGE

      private static final int HASH_RANGE
      Range to use for creating hased ending when truncating identifiers.
      See Also:
  • Constructor Details

    • JPOXIdentifierFactory

      public JPOXIdentifierFactory(DatastoreAdapter dba, org.datanucleus.ClassLoaderResolver clr, Map props)
  • Method Details

    • truncate

      protected String truncate(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.