public class MyCustomerPrepareInterceptor implements PrepareInterceptor { private static final Logger LOG = Logger.getLogger(MyCustomerPrepareInterceptor.class); @Override public void onPrepare(CustomerModel customerModel, InterceptorContext interceptorContext) throws InterceptorException { . . . final MyItemModel myItem = interceptorContext.getModelService().create(MyItemModel.class); interceptorContext.registerElement(myItem); //interceptorContext.registerElementFor(myItem, PersistenceOperation.DELETE); . . . }
Leave a Reply