Re: CayenneDataObject eof equivalent method for awakeFromInsertion

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Oct 03 2007 - 13:43:02 EDT

  • Next message: Martin Thelian: "Transaction Isolation level SERIALIZABLE"

    On Oct 3, 2007, at 8:40 PM, Robert A. Decker wrote:

    > I've looked through the API doc for CayenneDataObject but wasn't
    > able to find what I'm looking for. Is there a method similar to
    > eof's awakeFromInsertion?
    >
    > I'm looking for a method that is called when a data object (in my
    > case, a CayenneDataObject subclass) is inserted into a DataContext.
    >
    > For what I'm doing I can probably get away with putting my code in
    > the consructor for my class, but I'd rather put it in a method
    > that's called automatically when the data object is inserted into a
    > context.
    >
    > Thanks,
    > R

    In 3.0 you'd use lifecycle callbacks:

    http://cayenne.apache.org/doc/lifecycle-callbacks.html

    (still catching up with Modeler support, so there's some code
    involved in setting those up)

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Oct 03 2007 - 13:43:27 EDT