Class UniqueIdentifier
- java.lang.Object
-
- com.github.collinalpert.java2db.utilities.UniqueIdentifier
-
public class UniqueIdentifier extends java.lang.ObjectA factory class for generating unique identifiers. They are used for generating unique aliases.- Author:
- Collin Alpert
-
-
Constructor Summary
Constructors Constructor Description UniqueIdentifier()
-
Method Summary
Modifier and Type Method Description static java.lang.Stringgenerate(java.lang.String base, java.lang.String name)Generates a unique alias from a base.static java.lang.StringgetIdentifier(java.lang.String key)Gets the alias for a certain nested property.static voidunset()Resets the values in this class.
-
-
-
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 theBaseMappercan 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.
-
-