Creating,updating or deleting other items in interceptor

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);
    ...

  }
}

Bir Cevap Bırakın

XHTML: Şu etiketleri kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>