org.spicefactory.pimento.intercept
Annotation Type Merge


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface Merge

Marks a method as a listener for entities that were merged by a client. This is different than the JPA entity listeners since the annotated method will only be invoked if the entity removal was initiated by the client. The listener method must have a single method parameter of a persistent entity type. It may have an optional second parameter of type org.spicefactory.pimento.intercept.PropertyChangeSet in which case the first parameter will be the unmodified entity and the second can be used to inspect the properties changed by the client. For listeners without the second parameter the first parameter will already have all changes applied. It may throw Exception in which case the transaction will be rolled back.

Author:
Jens Halm