Re: Is there an awakeFromInsertion equivalent in cayenne?

From: Watkins, Garry (gwatkin..otleyrice.com)
Date: Mon Oct 30 2006 - 15:34:00 EST

  • Next message: Andrus Adamchik: "Re: Is there an awakeFromInsertion equivalent in cayenne?"

    How have things worked since you transitioned away from WO? Any major
    hurdles that you have encountered? Would you recommend doing it?

    Thanks

    -- 
    Garry Watkins
    

    Database Administrator Motley Rice LLC 843-216-9639

    > From: Bryan Lewis <brya..aine.rr.com> > Reply-To: <cayenne-use..ncubator.apache.org> > Date: Mon, 30 Oct 2006 14:53:18 -0500 > To: <cayenne-use..ncubator.apache.org> > Subject: Re: Is there an awakeFromInsertion equivalent in cayenne? > > Not directly. When we converted our old WebObjects apps, we made a > custom superclass that hooks setPersistenceState(): > > /** > * When any of our objects is inserted, call a method > * awakeFromInsertion() to allow the object class to do initialization. > */ > public void setPersistenceState(int state) > { > super.setPersistenceState(state); > > if (state == PersistenceState.NEW) { > awakeFromInsertion(); > } > } > > /** > * The default behavior for awakeFromInsertion() is to do nothing. > */ > public void awakeFromInsertion() > { > } > > > > > > Watkins, Garry wrote: >> I need to set up some default values. Is there an equivalent to >> awakeFromInsertion (WebObjects) for Cayenne? >> >> Thanks >> >

    Confidential & Privileged

    Unless otherwise indicated or obvious from its nature, the information contained in this communication is attorney-client privileged and confidential information/work product. This communication is intended for the use of the individual or entity named above. If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies--electronic, paper or otherwise--which you may have of this communication.



    This archive was generated by hypermail 2.0.0 : Mon Oct 30 2006 - 16:34:44 EST