• 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: can a WODisplayGroup use a subclass of an entity?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can a WODisplayGroup use a subclass of an entity?


  • Subject: Re: can a WODisplayGroup use a subclass of an entity?
  • From: Marek Wawrzyczny <email@hidden>
  • Date: Wed, 10 Sep 2003 10:10:20 +1000

What you need is to use the EOGenerator:

http://www.rubicode.com/Software/EOGenerator/

It comes with pretty good docs.


On Wednesday, Sep 10, 2003, at 09:30 Australia/Sydney, Denis Stanton wrote:


I thought I had a good idea to clean up my code a bit, but it's not
working. Maybe the idea was flawed, or maybe I'm just missing a detail.


I have an entity (Holiday) that represents a holiday reservation.
There are a number of common operations I need to perform on instances
of this entity.  For example, the table stores start and finish date
and I frequently need to calculate duration by subtracting one from the
other.

To do this I simply added a public int duration(){...} method to
Holiday.java.  I have added a number of methods like this.  My worry is
I am still developing the database and every time I extend the entity
definition I generate the java class again.  I have to be very careful
to merge the generated code with my extended class.  I'm worried that I
could slip up and lose my custom code. It finally dawned on me that I
was not making use of Java inheritance.  Instead of adding methods to
Holiday.java I should define public class HolidayExt extends Holiday
{...} and add my custom code there.  Then in my WOComponents I always
declare instance to be HolidayExt holidayItem = new HolidayExt()


Marek Wawrzyczny

software engineer
-------------------------->
ish group pty ltd
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400
http www.ish.com.au | email email@hidden
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: can a WODisplayGroup use a subclass of an entity?
      • From: Denis Stanton <email@hidden>
References: 
 >can a WODisplayGroup use a subclass of an entity? (From: Denis Stanton <email@hidden>)

  • Prev by Date: can a WODisplayGroup use a subclass of an entity?
  • Next by Date: Re: Database Connection Errors
  • Previous by thread: can a WODisplayGroup use a subclass of an entity?
  • Next by thread: Re: can a WODisplayGroup use a subclass of an entity?
  • Index(es):
    • Date
    • Thread