• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Updating EOObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating EOObjects


  • Subject: Re: Updating EOObjects
  • From: LD <email@hidden>
  • Date: Fri, 19 Aug 2005 11:41:05 +1000

Hi there,

On 19/08/2005, at 11:15 AM, Arturo Pérez wrote:

The other big thing is to follow a style of doing most of your work in the appendToResponse() and to never mutate any on-page data through the key values that WOBuilder can see.

I sense that appendToResponse has more important duties at hand...

Using the above then your createAndInsertInstance would be used like this
public void appendToResponse(....) {
if (aLicense == null) aLicense = ...createAndInsert...;
if (aPrincipal == null) aPrincipal = ...createAndInsert...;
super.appendToResponse(...);
}

I don't think that's very helpful in the OO world. Setters and getters are the way to go so that if you need to reference the object elsewhere in your code you don't come unstuck.


i.e.,

public Licence licence() {
if ( _aLicence == null ) {
_aLicence = ( Licence )EOUtilities.createAndInsertInstance ( ec, "Licence" );
}
return aLicence;
}
public void setLicence( Licence aLicence ) {
_aLicence = aLicence;
}


and so on...

with regards,
--

LD


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Updating EOObjects
      • From: Arturo Pérez <email@hidden>
References: 
 >Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Chuck Hill <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Chuck Hill <email@hidden>)
 >Re: Updating EOObjects (From: Arturo Pérez <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Arturo Pérez <email@hidden>)

  • Prev by Date: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Next by Date: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Previous by thread: Re: Updating EOObjects
  • Next by thread: Re: Updating EOObjects
  • Index(es):
    • Date
    • Thread