public class ModelContextProxy extends Object implements ModelContext
ModelContext per active Jalo session.
This had been added to avoid using Spring <scoped-proxy> setting which was much slower at that time.loading| Constructor and Description |
|---|
ModelContextProxy() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterDirectPersist(Collection<ModelWrapper> models)
Clear context after save with generic DAO
|
void |
afterDirectPersist(ModelWrapper wr)
Clear context after save with generic DAO
|
void |
afterPersist(Collection<ModelWrapper> models) |
void |
afterPropertiesSet() |
void |
attach(Object model,
Object source,
ModelConverter conv)
Attaches a new model to the context.
|
void |
clear()
Removes all attached models.
|
void |
detach(Object model,
Object source,
ModelConverter conv)
Removes a model from context.
|
ModelContext |
getActiveContext() |
Object |
getAttached(Object source,
ModelConverter conv)
Returns a attached model for a given source element and converter.
|
Set<Object> |
getModified()
Returns all attached model instances which are currently modified.
|
Set<Object> |
getNew()
Returns all attached model instances which are currently new.
|
boolean |
isAttached(Object model,
ModelConverter conv)
|
void |
setModelContextFactory(ModelContextFactory modelContextFactory) |
protected void |
unsetContext() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearLoading, isLoading, markLoadingprotected void unsetContext()
public ModelContext getActiveContext()
public void afterPersist(Collection<ModelWrapper> models)
afterPersist in interface ModelContextpublic void afterDirectPersist(Collection<ModelWrapper> models)
ModelContextafterDirectPersist in interface ModelContextpublic void afterDirectPersist(ModelWrapper wr)
ModelContextafterDirectPersist in interface ModelContextpublic void attach(Object model, Object source, ModelConverter conv)
ModelContextattach in interface ModelContextmodel - the model to holdsource - the source element - may be null for new modelsconv - the converter usedpublic void clear()
ModelContextclear in interface ModelContextpublic void detach(Object model, Object source, ModelConverter conv)
ModelContextdetach in interface ModelContextmodel - the model to removesource - its source - may be null for new modelsconv - the converter which manages the modelpublic Object getAttached(Object source, ModelConverter conv)
ModelContextgetAttached in interface ModelContextsource - the source element - must not be nullconv - the converterpublic Set<Object> getModified()
ModelContextgetModified in interface ModelContextpublic Set<Object> getNew()
ModelContextgetNew in interface ModelContextpublic boolean isAttached(Object model, ModelConverter conv)
ModelContextisAttached in interface ModelContextfalse otherwise.public void setModelContextFactory(ModelContextFactory modelContextFactory)
Copyright © 2017 SAP SE. All Rights Reserved.