• 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: Subclassing EOEditingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing EOEditingContext


  • Subject: Re: Subclassing EOEditingContext
  • From: Kieran Kelleher <email@hidden>
  • Date: Mon, 2 Jul 2007 16:53:26 -0400

MyEditingContext extends EOEditingContext


EOEditingContext ec = new MyEditingContext();


.... if you are using Wonder, you need to examine the ERXEC factory and make your own factory to return your subclass of ERXEC. Specify the custom factory in Properties somewhere ...... just poke around in ERXEC and you'll figure it out
MyEditingContext extends ERXEC



Example custom factory:

public class WKEditingContextFactory extends ERXEC.DefaultFactory {

    public WKEditingContextFactory() {
        super();
    }

protected EOEditingContext _createEditingContext(EOObjectStore parent) {

EOEditingContext newEc = new WKEditingContext(parent == null ? EOEditingContext.defaultParentObjectStore() : parent);
long currentTime = System.currentTimeMillis();
// Cannot set fetch timestamp on child ec's!!
if (!(parent instanceof EOEditingContext)) {
newEc.setFetchTimestamp( currentTime - ERXProperties.intForKeyWithDefault ( "EOEditingContextDefaultFetchTimestampLag", 360000 ) );
}


        return newEc;
    }
}



On Jul 2, 2007, at 4:17 PM, Ricardo Strausz wrote:

Hola!

What is the best practice to subclass the EOEditingContext (besides not subclassing at all)?

Some experience on that?

Dino

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Subclassing EOEditingContext (From: Ricardo Strausz <email@hidden>)

  • Prev by Date: Re: Subclassing EOEditingContext
  • Next by Date: Re: Subclassing EOEditingContext
  • Previous by thread: Re: Subclassing EOEditingContext
  • Next by thread: [OT] developing for the iPhone
  • Index(es):
    • Date
    • Thread