public class InterceptorContextAdapter extends Object implements InterceptorContext
| Constructor and Description |
|---|
InterceptorContextAdapter(InterceptorContext delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object model)
Deprecated.
|
boolean |
contains(Object model,
PersistenceOperation operation)
Checks is the given model is already registered in this InterceptorContext with the given operation.
|
boolean |
exists(Object model) |
Set<Object> |
getAllRegisteredElements()
Deprecated.
|
Object |
getAttribute(String key) |
Map<String,Set<Locale>> |
getDirtyAttributes(Object model)
Returns a map with all modified attribute qualifiers for the given model.
|
Set<Object> |
getElementsRegisteredFor(PersistenceOperation operation) |
ModelService |
getModelService() |
Object |
getSource(Object model)
Deprecated.
|
boolean |
isModified(Object model) |
boolean |
isModified(Object model,
String attribute) |
boolean |
isNew(Object model)
Tells if the model has been created and has not been saved yet.
|
boolean |
isRemoved(Object model) |
void |
registerElement(Object model)
Register the given
model to this InterceptorContext using the InterceptorContext's default operation. |
void |
registerElement(Object model,
Object source)
Deprecated.
|
void |
registerElementFor(Object model,
PersistenceOperation operation)
Register the given
model to this InterceptorContext using the given operation. |
void |
setAttribute(String key,
Object value) |
public InterceptorContextAdapter(InterceptorContext delegate)
@Deprecated public Object getSource(Object model)
getSource in interface InterceptorContextmodel - passed inDefaultModelService.get(Object)public boolean exists(Object model)
exists in interface InterceptorContextmodel - model instance to be searched forModelConverter.exists(Object) for
registered model converter for passed modelpublic boolean isModified(Object model)
isModified in interface InterceptorContextmodel - model instance to be searched forModelConverter.isModified(Object)
for registered model converter for passed modelpublic Map<String,Set<Locale>> getDirtyAttributes(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 registerElementFor(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 model@Deprecated public boolean contains(Object model)
InterceptorContextcontains in interface InterceptorContextmodel - model instance to be searched for@Deprecated public void registerElement(Object model, 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 boolean isModified(Object model, 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 void setAttribute(String key, Object value)
setAttribute in interface InterceptorContextkey - attribute namevalue - attribute passed into contextpublic boolean isRemoved(Object model)
isRemoved in interface InterceptorContextmodel - model instance to be searched forModelConverter.isRemoved(Object)
for registered model converter for passed modelpublic boolean isNew(Object model)
InterceptorContextisNew in interface InterceptorContextmodel - model instance to be searched forModelConverter.isNew(Object) for
registered model converter for passed modelpublic void registerElement(Object model)
InterceptorContextmodel to this InterceptorContext using the InterceptorContext's default operation.registerElement in interface InterceptorContextmodel - the model to be registered.public Object getAttribute(String key)
getAttribute in interface InterceptorContextkey - attribute namepublic ModelService getModelService()
getModelService in interface InterceptorContextpublic boolean contains(Object model, PersistenceOperation operation)
InterceptorContextcontains in interface InterceptorContextmodel - model instance to be searched foroperation - the operation to be searched forpublic Set<Object> getElementsRegisteredFor(PersistenceOperation operation)
getElementsRegisteredFor in interface InterceptorContext@Deprecated public Set<Object> getAllRegisteredElements()
getAllRegisteredElements in interface InterceptorContextCopyright © 2017 SAP SE. All Rights Reserved.