public interface ModelContext
| Modifier and Type | Field and Description |
|---|---|
static java.lang.ThreadLocal<java.util.Vector<PK>> |
loading |
| Modifier and Type | Method and Description |
|---|---|
void |
afterDirectPersist(java.util.Collection<ModelWrapper> wrappers)
Clear context after save with generic DAO
|
void |
afterDirectPersist(ModelWrapper wr)
Clear context after save with generic DAO
|
void |
afterPersist(java.util.Collection<ModelWrapper> models) |
void |
attach(java.lang.Object model,
java.lang.Object source,
ModelConverter conv)
Attaches a new model to the context.
|
void |
clear()
Removes all attached models.
|
default void |
clearLoading(PersistenceObject source) |
void |
detach(java.lang.Object model,
java.lang.Object source,
ModelConverter conv)
Removes a model from context.
|
java.lang.Object |
getAttached(java.lang.Object source,
ModelConverter conv)
Returns a attached model for a given source element and converter.
|
java.util.Set<java.lang.Object> |
getModified()
Returns all attached model instances which are currently modified.
|
java.util.Set<java.lang.Object> |
getNew()
Returns all attached model instances which are currently new.
|
boolean |
isAttached(java.lang.Object model,
ModelConverter conv)
|
default boolean |
isLoading(PersistenceObject source) |
default void |
markLoading(PersistenceObject source) |
static final java.lang.ThreadLocal<java.util.Vector<PK>> loading
void afterPersist(java.util.Collection<ModelWrapper> models)
void attach(java.lang.Object model,
java.lang.Object source,
ModelConverter conv)
model - the model to holdsource - the source element - may be null for new modelsconv - the converter usedjava.lang.IllegalStateException - if there is a existing model mapped to the same source and convertervoid detach(java.lang.Object model,
java.lang.Object source,
ModelConverter conv)
model - the model to removesource - its source - may be null for new modelsconv - the converter which manages the modeljava.lang.Object getAttached(java.lang.Object source,
ModelConverter conv)
source - the source element - must not be nullconv - the converterboolean isAttached(java.lang.Object model,
ModelConverter conv)
false otherwise.void clear()
java.util.Set<java.lang.Object> getNew()
java.util.Set<java.lang.Object> getModified()
void afterDirectPersist(java.util.Collection<ModelWrapper> wrappers)
void afterDirectPersist(ModelWrapper wr)
default boolean isLoading(PersistenceObject source)
default void markLoading(PersistenceObject source)
default void clearLoading(PersistenceObject source)
Copyright © 2018 SAP SE. All Rights Reserved.