Class UniqueIdentifierCalculator
java.lang.Object
com.bluebell.greenhouse.radicle.util.UniqueIdentifierCalculator
Service for handling computations regarding unique identifiers that are typical used on
GenericDTOs.- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateGenericUid(Object... values) Generates a generic uid from the given values.static StringgenerateUid(GenericEntity entity) Generates the uid from the givenGenericEntity.static StringgenerateUid(Long id, Class<? extends GenericEntity> entityType) Generates the uid for a projected row, which carries an id but no entity.static longGenerates a unique long from the given uid.static longretrieveId(String uid) Retrieves the id for an entity from the givenGenericDTO.
-
Method Details
-
generateUid
Generates the uid from the givenGenericEntity.- Parameters:
entity-GenericEntity- Returns:
- uid
-
generateUid
Generates the uid for a projected row, which carries an id but no entity.- Parameters:
id- entity identityType- entity type the row was projected from- Returns:
- uid
-
retrieveId
Retrieves the id for an entity from the givenGenericDTO.- Parameters:
uid- unique identifier- Returns:
- id
-
generateUniqueIdentifierAsLong
Generates a unique long from the given uid.- Parameters:
uid- unique identifier- Returns:
- unique long
-
generateGenericUid
-