Class UniqueIdentifier


  • public class UniqueIdentifier
    extends java.lang.Object
    A factory class for generating unique identifiers. They are used for generating unique aliases.
    Author:
    Collin Alpert
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String generate​(java.lang.String base, java.lang.String name)
      Generates a unique alias from a base.
      static java.lang.String getIdentifier​(java.lang.String key)
      Gets the alias for a certain nested property.
      static void unset()
      Resets the values in this class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UniqueIdentifier

        public UniqueIdentifier()
    • Method Detail

      • generate

        public static java.lang.String generate​(java.lang.String base,
                                                java.lang.String name)
        Generates a unique alias from a base.
        Parameters:
        base - The base to generate from.
        name - The name of the nested property for which this alias is used. It is needed so the BaseMapper can retrieve it later.
        Returns:
        A unique alias.
      • getIdentifier

        public static java.lang.String getIdentifier​(java.lang.String key)
        Gets the alias for a certain nested property.
        Parameters:
        key - The name of the nested property.
        Returns:
        The alias.
      • unset

        public static void unset()
        Resets the values in this class.