[JIRA] Updated: (CAY-879) Storing lifecycle listebers and callbacks in the *.map.xml and loading them back

From: Vasil Tarasevich (JIRA) ("Vasil)
Date: Thu Oct 25 2007 - 17:02:51 EDT

  • Next message: Aristedes Maniatis: "build-mac.sh"

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

    Vasil Tarasevich updated CAY-879:
    ---------------------------------

        Attachment: CAY-879_4.patch

    Added support for "exclude-superclass-listeners" and "exclude-default-listeners" attributes

    > Storing lifecycle listebers and callbacks in the *.map.xml and loading them back
    > --------------------------------------------------------------------------------
    >
    > Key: CAY-879
    > URL: https://issues.apache.org/cayenne/browse/CAY-879
    > Project: Cayenne
    > Issue Type: Task
    > Components: Cayenne Core Library
    > Affects Versions: 3.0
    > Reporter: Andrus Adamchik
    > Assignee: Andrus Adamchik
    > Fix For: 3.0
    >
    > Attachments: CAY-879_3.patch, CAY-879_4.patch
    >
    >
    > DataMap and ObjEntity classes support mapping lifecycle callbacks, however there is no support for loading them from XML and storing them back to XML. Here is what needs to be done to achieve that:
    > 1. XML Format Additions (applicable for DataMap XML files - *.map.xml)
    > * new "entity-listener" tag as a child of "obj-entity", describing callbacks on listener classes separate from the entity class. The tag itself is compatible with JPA spec. Here is an example:
    > <obj-entity ...>
    > ...
    > <entity-listener class="mylistenerclass">
    > <pre-persist method-name="abc"/>
    > <post-update method-name="xyz"/>
    > </entity-listener>
    > </obj-entity>
    > * new callback tags - children of "obj-entity", describing callbacks on the entity class itself. The tags are compatible with JPA spec. Here is an example:
    > <obj-entity ...>
    > ...
    > <pre-persist method-name="abc"/>
    > <post-update method-name="xyz"/>
    > </obj-entity>
    > * new "obj-entity" tag attributes: "exclude-superclass-listeners", "exclude-default-listeners".
    > * new "entity-listener" tag as a child of "data-map", describing default callbacks on all entities. Format is the same as for the "obj-entity":
    > <data-map ...>
    > ...
    > <entity-listener class="mylistenerclass">
    > <pre-persist method-name="abc"/>
    > <post-update method-name="xyz"/>
    > </entity-listener>
    > </data-map>
    > * Implement listener saving in DataMap.encodeAsXML(..)
    > * Implement listener and callback saving in ObjEntity.encodeAsXML
    > * Implement listener and callback loading in MapLoader.
    > * Write unit tests

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



    This archive was generated by hypermail 2.0.0 : Thu Oct 25 2007 - 17:03:38 EDT