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.
    • Constructor Detail

      • JPOXIdentifierFactory

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

      • 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.