Class UUIDHexGenerator

  • All Implemented Interfaces:
    ExportableProducer, Configurable, IdentifierGenerator

    public class UUIDHexGenerator
    extends AbstractUUIDGenerator
    uuid

    A UUIDGenerator that returns a string of length 32, This string will consist of only hex digits. Optionally, the string may be generated with separators between each component of the UUID.

    Mapping parameters supported: separator.

    • Constructor Detail

      • UUIDHexGenerator

        public UUIDHexGenerator()
    • Method Detail

      • generate

        public Serializable generate​(SharedSessionContractImplementor session,
                                     Object obj)
        Description copied from interface: IdentifierGenerator
        Generate a new identifier.
        Parameters:
        session - The session from which the request originates
        obj - the entity or collection (idbag) for which the id is being generated
        Returns:
        a new identifier
      • format

        protected String format​(int intValue)
      • format

        protected String format​(short shortValue)