<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    敬的世界

    常用鏈接

    統計

    最新評論

    The PathProxy pattern : Persisting complex associations

    PathProxy is a design pattern for persisting complex relationships without cluttering up your database.

    When your class relationships require pathing knowledge, that is , knowledge about a number of related objects, then the standard "many - to" associations wont cut it, The PathProxy class is an abstraction of such relationships, allowing you to manage, persist, and extend them without complicating the classes themselves, and without a proliferation of lookup tables.

    The fundamental idea is this?: create class that can point to any entity in the system, and that also can reference its own class as a parent, With this class, you create a tree structure that maintains the interrelationships outside of the referenced objects. Building a JPA mapping around this class requires some though, but is quite powerful.

    Path-Specific relationships

    The
    PathProxy solution applies in any situation where an entity can appear as an association of another entity type, but only for a specific path. I refer to such relationships as path specific. E is a child of D, but only for the path A-->B-->C-->D-->E.On another path, D might have no children (A-->B-->Q-->D) or might have a different child or children(A-->B-->X-->D-->Z)

    As an example, imagine a development team consisting of a project manager named Johnie and two developers, Robert and Mukunda. On project A, Johnie leads Robert and on Project B, Johnie leads Mukunda. This is a somewhat contrived example, but not an uncommon scenario in the world of corporate structures. In the real world, you might have the efficiency of the same process in different business locations, or the actions taken in response to the same event by different teams

    PathProxy.jpg

    When to use PathProxy?

    You have many entities whose interrelationships are complex and require knowledge of other relationships. Creating explicit objects to represent these types of? relationships becomes burdensome. This is expecially true if the objects must be persisted, creating a proliferation of database tables.

    Consider PathProxy if , Your system design calls for a number of casses whose sole or primary function is to model the relationships between other objects.

    Using PathProxy is more complicated than using? simple objects to represent relationships, so consider your particular situation. If you have few relationships to store and they are not too complicated, PathProxy may not be the right choice. On the other hand, once you reach a certain level of relationship complexity, using PathProxy will greatly simplify your overall system design. Beijng able to reuse the same machnaism over and over again is also a huge time-saver.


    來自 : http://www.javaworld.com/javaworld/jw-07-2008/jw-07-pathproxy.html?page=1

    posted on 2008-10-04 19:09 picture talk 閱讀(207) 評論(0)  編輯  收藏 所屬分類: 框架

    主站蜘蛛池模板: 亚洲国产一区二区三区在线观看| 亚洲精品国产精品乱码不卡 | 美女内射无套日韩免费播放 | 亚洲精品免费观看| 久久久久久久综合日本亚洲| 91成人免费福利网站在线| 亚洲人成无码网WWW| 中文字幕不卡高清免费| 精品国产综合成人亚洲区| 国产啪精品视频网站免费尤物| 亚洲精品国产精品乱码不99| 无码专区AAAAAA免费视频| 亚洲日本香蕉视频| 成人毛片免费在线观看| 亚洲AV成人无码网天堂| 亚洲av高清在线观看一区二区 | 亚洲欧洲中文日韩久久AV乱码| 午夜成人无码福利免费视频| 亚洲最大av无码网址| 免费无码黄网站在线看| 亚洲精品91在线| 免费看少妇作爱视频| 一级做a爰片久久免费| 久久精品国产亚洲香蕉| 国产精品色拉拉免费看| 色偷偷亚洲第一综合网| 亚洲自偷自偷在线制服| 国产h肉在线视频免费观看| 亚洲AV无码成人精品区日韩 | 日本免费网站观看| 国产精品无码免费专区午夜 | 亚洲色大成网站www永久男同 | 免费人妻无码不卡中文字幕系| 亚洲一区二区三区高清视频| 免费观看日本污污ww网站一区 | 色老头永久免费网站| 免费在线观看亚洲| 78成人精品电影在线播放日韩精品电影一区亚洲| 亚洲综合免费视频| 一级a性色生活片久久无少妇一级婬片免费放 | 激情内射亚洲一区二区三区|