• 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: Entity dependence analisys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entity dependence analisys


  • Subject: Re: Entity dependence analisys
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 29 Aug 2008 14:27:48 -0700

FWIW,

EOModelGroup mg = EOModelGroup.defaultGroup();

You can handle more EOF configurations if you use:

EOModelGroup mg = EOUtilities.modelGroup(ec);

There can be more than one...

Chuck


On Aug 29, 2008, at 1:44 PM, Florijan Stamenkovic wrote:

Hi all,


I made a little something to analyze dependencies between entities, and sort entities based on them. So that the non-dependent entities are at a lower index in the resulting list then the ones they are dependent on. The current implementation only deals with relationships, but the analysis method is agnostic of dependency types. To add your own dependencies check out the comment at line 127. It should work with any kind of a dependency constraint.


Usage:
Put into whichever app, and call the static sortedEntities() method. The returned value should be a list of entities in which the non- dependent entities are at a lower index in the resulting list then the ones they are dependent on. The entities are loaded from the default model group. If there is a circular dependency, an exception should be thrown.


It is not very well commented, and totally not optimized, as I am still working on it. I also hope to be able to fine-grain it a bit. Till now the only fine graining is the possibility to define non- mandatory dependencies, the _isDependent(...) method will use that flag.

Let me know if it works for you or not. I tested it with a fairly complex model (around 15 entities, 50+ relationships) successfully. It should be able to chew through anything though. I'd really appreciate if somebody with a really super-complex model group could give it a go.

F

<DependencyAnalizer.java> _______________________________________________
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

-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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: 
 >Entity dependence analisys (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: Notifications
  • Next by Date: Re: Notifications
  • Previous by thread: Re: Entity dependence analisys
  • Next by thread: EOGen whoes
  • Index(es):
    • Date
    • Thread