com.tintin.devcloud.database.persistence.GenericPersistanceManager Class Reference

List of all members.

Static Public Member Functions

static< T > T getEntityReference (Class< T > klass, Object id)
static< T > T findEntity (Class< T > klass, Object id)
static< T > T getEntity (Class< T > klass, Object id)
static< T > void saveEntity (T entity)
 Save any kind of entity into the persistent storage.
static synchronized< T > T updateEntity (T entity, long id)
 Updates the existing record of the given entity in the database with the new values.
static< T > void removeEntity (T entity, long id)
 Removes the given entity from the database.
static void closeEntityManager (EntityManager em)

Member Function Documentation

static void com.tintin.devcloud.database.persistence.GenericPersistanceManager.closeEntityManager ( EntityManager  em  )  [static]
static <T> T com.tintin.devcloud.database.persistence.GenericPersistanceManager.findEntity ( Class< T >  klass,
Object  id 
) [static]
static <T> T com.tintin.devcloud.database.persistence.GenericPersistanceManager.getEntity ( Class< T >  klass,
Object  id 
) [static]
static <T> T com.tintin.devcloud.database.persistence.GenericPersistanceManager.getEntityReference ( Class< T >  klass,
Object  id 
) [static]
static <T> void com.tintin.devcloud.database.persistence.GenericPersistanceManager.removeEntity ( entity,
long  id 
) [static]

Removes the given entity from the database.

Currently this method removes the given entity by loading it into the entity manager. This requires an additional hit to the database. However, as removal is a rare operation, the additional database hit is tolerable.

Parameters:
entity to be removed
static <T> void com.tintin.devcloud.database.persistence.GenericPersistanceManager.saveEntity ( entity  )  [static]

Save any kind of entity into the persistent storage.

Parameters:
entity to be stored
static synchronized<T> T com.tintin.devcloud.database.persistence.GenericPersistanceManager.updateEntity ( entity,
long  id 
) [static]

Updates the existing record of the given entity in the database with the new values.

Parameters:
entity to be updated

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations
Generated on Sun Jun 9 14:54:34 2013 for TinTinDEVCLOUD by  doxygen 1.6.3