net.sf.gilead.core.store.stateful
Class UniqueNameGenerator

java.lang.Object
  extended by net.sf.gilead.core.store.stateful.UniqueNameGenerator

public class UniqueNameGenerator
extends java.lang.Object

Static class for unique name generation

Author:
BMARCHESSON

Constructor Summary
UniqueNameGenerator()
           
 
Method Summary
static java.lang.String generateUniqueName(IPersistenceUtil persistenceUtil, java.lang.Object hibernatePojo)
          Generates a unique name for the argument Hibenrate pojo
static java.lang.String generateUniqueName(IPersistenceUtil persistenceUtil, java.lang.Object pojo, java.lang.Class<?> hibernateClass)
          Generates a unique name for the argument DTO associated with the hibernateClass
static java.lang.String generateUniqueName(java.io.Serializable id, java.lang.Class<?> hibernateClass)
          Generates a unique name for the argument DTO associated with the hibernateClass
static java.io.Serializable getUniqueId(IPersistenceUtil persistenceUtil, java.lang.Object persistentBean)
          Gets a unique ID for the argument persistent bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueNameGenerator

public UniqueNameGenerator()
Method Detail

generateUniqueName

public static java.lang.String generateUniqueName(IPersistenceUtil persistenceUtil,
                                                  java.lang.Object hibernatePojo)
Generates a unique name for the argument Hibenrate pojo


generateUniqueName

public static java.lang.String generateUniqueName(IPersistenceUtil persistenceUtil,
                                                  java.lang.Object pojo,
                                                  java.lang.Class<?> hibernateClass)
Generates a unique name for the argument DTO associated with the hibernateClass


generateUniqueName

public static java.lang.String generateUniqueName(java.io.Serializable id,
                                                  java.lang.Class<?> hibernateClass)
Generates a unique name for the argument DTO associated with the hibernateClass


getUniqueId

public static java.io.Serializable getUniqueId(IPersistenceUtil persistenceUtil,
                                               java.lang.Object persistentBean)
Gets a unique ID for the argument persistent bean. It simply returns the ID of persistent bean, or the ID of the parent persistent bean for component types.

Parameters:
persistenceUtil - the persistence util
persistentBean - the persistent bean
Returns: