|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceContext
Holds entity beans by there type and id.
This is used to ensure only one instance for a given entity type and id is used to build object graphs from queries and lazy loading.
Method Summary | |
---|---|
void |
clear()
Clear all the references. |
void |
clear(Class<?> beanType)
Clear all the references for a given type of entity bean. |
void |
clear(Class<?> beanType,
Object uid)
Clear the reference to a specific entity bean. |
Object |
get(Class<?> beanType,
Object uid)
Return an object given its type and unique id. |
void |
put(Object id,
Object bean)
Put the entity bean into the PersistanceContext. |
Object |
putIfAbsent(Object id,
Object bean)
Put the entity bean into the PersistanceContext if one is not already present (for this id). |
int |
size(Class<?> beanType)
Return the number of beans of the given type in the persistence context. |
Method Detail |
---|
void put(Object id, Object bean)
Object putIfAbsent(Object id, Object bean)
Returns an existing entity bean (if one is already there) and otherwise returns null.
Object get(Class<?> beanType, Object uid)
void clear()
void clear(Class<?> beanType)
void clear(Class<?> beanType, Object uid)
int size(Class<?> beanType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |