You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/11/14 10:56:14 UTC

[jira] Closed: (CAY-1509) Lifecycle event annotations support

     [ https://issues.apache.org/jira/browse/CAY-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1509.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.1M1)
                   3.1M2

Checked in a basic implementation. One fuzzy area is inheritance in listener classes.

> Lifecycle event annotations support
> -----------------------------------
>
>                 Key: CAY-1509
>                 URL: https://issues.apache.org/jira/browse/CAY-1509
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library
>    Affects Versions: 3.1M1
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M2
>
>
> Add annotations for lifecycle events:
> @PrePersist, @PostPersist, etc. (all the standard ones, total of 8 annotations)
> Each annotated method can process events for preset collection of entity classes and/or a set of unknown entity classes tagged with a custom annotation. In the later case a listener is cleanly decoupled from specific entities (this feature is mixin-inspired). E.g:
> @Target(METHOD) @Retention(RUNTIME)
> @PrePersist {
>    Class<? extends Persistent>[] entityTypes();
>    Class<? extends Annotation>[] entityAnnotations();
> }
> LifecycleCallbackRegistry API:
> /**
>  * This form of listener registration is very simple and type-safe compared to other forms available in 3.0 LifecycleCallbackRegistry.
>  */
> public void addListener(Object annotatedListener);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.