public class DefaultModelServiceInterceptorContext extends java.lang.Object implements InterceptorContext
InterceptorContext.| Constructor and Description |
|---|
DefaultModelServiceInterceptorContext(DefaultModelService parent,
java.util.Collection<java.lang.Object> initialElements,
ModelWrapperContext wrapperContext) |
DefaultModelServiceInterceptorContext(DefaultModelService parent,
PersistenceOperation defaultPersistenceOperation,
java.util.Collection<? extends java.lang.Object> initialElements,
ModelWrapperContext wrapperContext) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object model)
Deprecated.
since ages
|
boolean |
contains(java.lang.Object model,
PersistenceOperation operation)
Checks is the given model is already registered in this InterceptorContext with the given operation.
|
InterceptorContextSnapshot |
createSnapshot() |
RegisteredElements |
elementsRegisteredFor(PersistenceOperation operation) |
boolean |
exists(java.lang.Object model) |
java.util.Set<java.lang.Object> |
getAllRegisteredElements() |
java.lang.Object |
getAttribute(java.lang.String key) |
java.util.Map<java.lang.String,java.util.Set<java.util.Locale>> |
getDirtyAttributes(java.lang.Object model)
Returns a map with all modified attribute qualifiers for the given model.
|
java.util.Set<java.lang.Object> |
getElementsRegisteredFor(PersistenceOperation operation) |
RegisteredElements |
getInitialElements() |
java.util.Collection<ModelWrapper> |
getInitialWrappers() |
ModelService |
getModelService() |
Schedule |
getSchedule() |
java.lang.Object |
getSource(java.lang.Object model)
Deprecated.
since ages
|
WrapperRegistry |
getWrapperRegistry() |
boolean |
isAlreadyNotified(java.lang.Object model) |
boolean |
isModified(java.lang.Object model) |
boolean |
isModified(java.lang.Object model,
java.lang.String attribute) |
boolean |
isNew(java.lang.Object model)
Tells if the model has been created and has not been saved yet.
|
boolean |
isRemoved(java.lang.Object model) |
void |
markAsNotified(java.lang.Object model) |
void |
registerElement(java.lang.Object model)
Register the given
model to this InterceptorContext using the InterceptorContext's default operation. |
void |
registerElement(java.lang.Object model,
java.lang.Object source)
Register the given
model to this InterceptorContext using the InterceptorContext's default operation. |
void |
registerElementFor(java.lang.Object model,
PersistenceOperation operation)
Register the given
model to this InterceptorContext using the given operation. |
void |
registerWrappedElementsFor(java.util.Collection<ModelWrapper> wrappers,
PersistenceOperation operation) |
void |
schedule(ModelWrapper wrapper) |
void |
setAttribute(java.lang.String key,
java.lang.Object value) |
java.util.Collection<ModelWrapper> |
wrap(java.util.Collection<? extends java.lang.Object> models,
PersistenceOperation operation) |
public DefaultModelServiceInterceptorContext(DefaultModelService parent, PersistenceOperation defaultPersistenceOperation, java.util.Collection<? extends java.lang.Object> initialElements, ModelWrapperContext wrapperContext)
public DefaultModelServiceInterceptorContext(DefaultModelService parent, java.util.Collection<java.lang.Object> initialElements, ModelWrapperContext wrapperContext)
public void registerElement(java.lang.Object model,
java.lang.Object source)
InterceptorContextmodel to this InterceptorContext using the InterceptorContext's default operation.registerElement in interface InterceptorContextmodel - the model to be registered.source - the source of the model (optional)public void registerElement(java.lang.Object model)
InterceptorContextmodel to this InterceptorContext using the InterceptorContext's default operation.registerElement in interface InterceptorContextmodel - the model to be registered.public void registerElementFor(java.lang.Object model,
PersistenceOperation operation)
InterceptorContextmodel to this InterceptorContext using the given operation.registerElementFor in interface InterceptorContextmodel - the model to be registered.operation - the operation to be performed with the given modelpublic RegisteredElements elementsRegisteredFor(PersistenceOperation operation)
public java.util.Set<java.lang.Object> getAllRegisteredElements()
getAllRegisteredElements in interface InterceptorContextpublic java.util.Set<java.lang.Object> getElementsRegisteredFor(PersistenceOperation operation)
getElementsRegisteredFor in interface InterceptorContext@Deprecated public boolean contains(java.lang.Object model)
InterceptorContextcontains in interface InterceptorContextmodel - model instance to be searched forpublic boolean contains(java.lang.Object model,
PersistenceOperation operation)
InterceptorContextcontains in interface InterceptorContextmodel - model instance to be searched foroperation - the operation to be searched for@Deprecated public java.lang.Object getSource(java.lang.Object model)
getSource in interface InterceptorContextmodel - passed inDefaultModelService.get(Object)public boolean isNew(java.lang.Object model)
InterceptorContextisNew in interface InterceptorContextmodel - model instance to be searched forModelConverter.isNew(Object) for
registered model converter for passed modelpublic boolean exists(java.lang.Object model)
exists in interface InterceptorContextmodel - model instance to be searched forModelConverter.exists(Object) for
registered model converter for passed modelpublic boolean isModified(java.lang.Object model)
isModified in interface InterceptorContextmodel - model instance to be searched forModelConverter.isModified(Object)
for registered model converter for passed modelpublic boolean isModified(java.lang.Object model,
java.lang.String attribute)
isModified in interface InterceptorContextmodel - model instance to be searched forattribute - attribute name to be searched forModelConverter.isModified(Object, String) for
registered model converter for passed model , attributepublic boolean isRemoved(java.lang.Object model)
isRemoved in interface InterceptorContextmodel - model instance to be searched forModelConverter.isRemoved(Object)
for registered model converter for passed modelpublic ModelService getModelService()
getModelService in interface InterceptorContextpublic java.lang.Object getAttribute(java.lang.String key)
getAttribute in interface InterceptorContextkey - attribute namepublic void setAttribute(java.lang.String key,
java.lang.Object value)
setAttribute in interface InterceptorContextkey - attribute namevalue - attribute passed into contextpublic java.util.Map<java.lang.String,java.util.Set<java.util.Locale>> getDirtyAttributes(java.lang.Object model)
InterceptorContextnull the key is a
non-localized attribute qualifier else the map value contains the locale in which language the localized attribute
was modified.getDirtyAttributes in interface InterceptorContextmodel - the new (not saved) modelpublic void registerWrappedElementsFor(java.util.Collection<ModelWrapper> wrappers, PersistenceOperation operation)
public InterceptorContextSnapshot createSnapshot()
public RegisteredElements getInitialElements()
public void markAsNotified(java.lang.Object model)
public boolean isAlreadyNotified(java.lang.Object model)
public java.util.Collection<ModelWrapper> getInitialWrappers()
public void schedule(ModelWrapper wrapper)
public Schedule getSchedule()
public java.util.Collection<ModelWrapper> wrap(java.util.Collection<? extends java.lang.Object> models, PersistenceOperation operation)
public WrapperRegistry getWrapperRegistry()
Copyright © 2018 SAP SE. All Rights Reserved.