XInterceptor<XObject>
- create bean mapping
```xml
<bean id="..." class="...">
<property name="interceptor" ref="beanInterceptor">
<property name="typeCode" ref="XObject">
</bean>
interceptor for model lifecycle are:
This Interceptor is called when we create a new model filled with its default values calling modelService.initDefaults() or modelService.create().
This Interceptor is called before a model is saved to the database(modelService.save()) and before it is validated by Validate interceptors.
This Interceptor is called before a model is saved to the database(modelService.save()) after is been prepared by the Prepare interceptors,. You can use Validate Interceptors to validate values of the model and raise an InterceptorException if any values are not valid. An exception raised during execution prevents the model from being saved.
This Interceptor is called after a model is retrieved from the database using modelService.get().
This Interceptor is called before a model is removed from the database using modelService.remove().
final Map<String, Object> params = ImmutableMap.of(InterceptorExecutionPolicy.DISABLED_INTERCEPTOR_BEANS, ImmutableSet.of("beanInterceptor"));
getSessionService().executeInLocalViewWithParams(params, new SessionExecutionBody()
{
@Override
public void executeWithoutResult()
{
}
});
INSERT header[disable.interceptor.types=validate]
Tags: [
]