public interface GenericEntityDao
PersistenceUnit
.Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear level 1 cache
|
void |
clearAutoFlushMode() |
void |
enableAutoFlushMode() |
void |
flush()
Flush changes to the persistence store
|
Class<?> |
getCeilingImplClass(String className)
Finds the ceiling implementation for the entity
|
javax.persistence.EntityManager |
getEntityManager()
Gathers the
EntityManager that is based on blPU |
Serializable |
getIdentifier(Object entity)
Retrieve the identifier from the Hibernate entity (the entity must reside in the current session)
|
Class<?> |
getImplClass(String className)
For a given className, finds the parent implementation class as defined in the
EntityConfiguration |
boolean |
idAssigned(Object object)
Whether or not this object is an
Entity and whether or not it already has an id assigned |
void |
persist(Object object)
Persist the new entity
|
<T> List<T> |
readAllGenericEntity(Class<T> clazz) |
<T> List<T> |
readAllGenericEntity(Class<T> clazz,
int limit,
int offset)
Finds all generic entities for a given classname, with pagination options.
|
List<Long> |
readAllGenericEntityId(Class<?> clazz) |
<T> Long |
readCountGenericEntity(Class<T> clazz)
Finds how many of the given entity class are persisted
|
<T> T |
readGenericEntity(Class<T> clazz,
Object id)
Finds a generic entity by a classname and id
|
void |
remove(Object object)
Remove the entity
|
<T> T |
save(T object)
Saves a generic entity
|
boolean |
sessionContains(Object object)
Whether or not the current hibernate session (level 1) contains the object
|
<T> T readGenericEntity(Class<T> clazz, Object id)
clazz
- id
- Class<?> getImplClass(String className)
EntityConfiguration
className
- Class<?> getCeilingImplClass(String className)
className
- <T> T save(T object)
object
- void persist(Object object)
object
- void remove(Object object)
object
- <T> Long readCountGenericEntity(Class<T> clazz)
clazz
- <T> List<T> readAllGenericEntity(Class<T> clazz, int limit, int offset)
clazz
- limit
- offset
- Serializable getIdentifier(Object entity)
entity
- void flush()
void clearAutoFlushMode()
void enableAutoFlushMode()
void clear()
boolean sessionContains(Object object)
object
- boolean idAssigned(Object object)
Entity
and whether or not it already has an id assignedobject
- javax.persistence.EntityManager getEntityManager()
EntityManager
that is based on blPUEntityManager
Copyright © 2022. All rights reserved.