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 |
( |
T |
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:
-
static <T> void com.tintin.devcloud.database.persistence.GenericPersistanceManager.saveEntity |
( |
T |
entity |
) |
[static] |
Save any kind of entity into the persistent storage.
- Parameters:
-
static synchronized<T> T com.tintin.devcloud.database.persistence.GenericPersistanceManager.updateEntity |
( |
T |
entity, |
|
|
long |
id | |
|
) |
| | [static] |
Updates the existing record of the given entity in the database with the new values.
- Parameters:
-
The documentation for this class was generated from the following file: