public class EntityContextImpl<T> extends Object implements EntityContext<T>
| Modifier and Type | Field and Description |
|---|---|
protected Map<T,Map<String,Object>> |
entityStates |
| Constructor and Description |
|---|
EntityContextImpl() |
EntityContextImpl(Map<T,Map<String,Object>> beanStates) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkManaged(Object entity) |
static <T> EntityContext<T> |
createIdentityContext(Class<T> clazz) |
Map<String,Object> |
get(Object entity) |
<X> X |
getAttribute(Object entity,
String attribute,
X defaultValue) |
Map<String,Object> |
getOrCreate(T entity) |
Map<String,Object> |
getState(Object entity) |
boolean |
isManaged(Object entity) |
Map<String,Object> |
register(T entity) |
void |
setAttribute(T entity,
String attribute,
Object value)
getsOrCreates an entity and sets an attribute
|
public Map<String,Object> getOrCreate(T entity)
getOrCreate in interface EntityContext<T>public Map<String,Object> register(T entity)
register in interface EntityContext<T>public void checkManaged(Object entity)
public Map<String,Object> getState(Object entity)
getState in interface EntityContext<T>public boolean isManaged(Object entity)
isManaged in interface EntityContext<T>public static <T> EntityContext<T> createIdentityContext(Class<T> clazz)
public void setAttribute(T entity, String attribute, Object value)
EntityContextsetAttribute in interface EntityContext<T>public <X> X getAttribute(Object entity, String attribute, X defaultValue)
getAttribute in interface EntityContext<T>Copyright © 2017. All rights reserved.