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

Entity dependence analisys


  • Subject: Entity dependence analisys
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Fri, 29 Aug 2008 16:44:11 -0400

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

Attachment: DependencyAnalizer.java
Description: Binary data

 _______________________________________________
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: Entity dependence analisys
      • From: Chuck Hill <email@hidden>
    • Re: Entity dependence analisys
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Notifications
  • Next by Date: Re: Entity dependence analisys
  • Previous by thread: Re: Notifications
  • Next by thread: Re: Entity dependence analisys
  • Index(es):
    • Date
    • Thread