• Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: Core Library
    • Labels:


      This issue is about refactoring of the lifecycle callback classes. The goal is API consistency and ease of use. Technically callback API hasn't been officially released as of the date the issue is created, so API changing is not a big deal, however since the API was advertised on the user list for more than a few months already, documenting all the changes is a courtesy to the early adopters.

      • Moving callback type constants (PRE_PERSIST, POST_PERSIST, ...) from LifecycleEventCallback to, as this information is used in the raw mapping as well as in compiled descriptors.
      • Introducing org.apache.cayenne.LifecycleListener as an optional callback interface to simplify manual callback registration.
      • Moving all runtime callback handling classes to "reflect" package from "map".
      • Making LifecycleEventCallback a non-public class instead of a public interface - it is used internally, and shouldn't be invoked by the users.
      • Introducing org.apache.cayenne.reflect.LifecycleCallbackRegistry class . It keeps a collection of handlers for all event types. This is the public class that deals with callbacks in runtime.
      • Renaming LifecycleEventCallbackMap to LifecycleCallbackEventHandler and making most methods non-public (accessed via LifecycleCallbackRegistry).

      Will need to document the new API in the User Guide:


        Andrus Adamchik created issue -
        Andrus Adamchik made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Henri Yandell made changes -
        Project Import Sat Mar 21 00:51:04 PDT 2009 [ 1237621864637 ]
        Ari Maniatis made changes -
        Workflow jira [ 12456536 ] Cayenne workflow [ 12487393 ]


          • Assignee:
            Andrus Adamchik
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: