<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 閱讀(202) 評論(0)  編輯  收藏 所屬分類: 框架

    主站蜘蛛池模板: 亚洲精品国产精品| 亚洲AV电影天堂男人的天堂| 美女被免费网站视频在线| 无码视频免费一区二三区| 亚洲天堂免费在线| 一个人看的www在线观看免费| 亚洲熟伦熟女新五十路熟妇 | 亚洲另类无码一区二区三区| 妻子5免费完整高清电视| 麻豆狠色伊人亚洲综合网站| 在线视频免费观看www动漫| 亚洲精品无码av中文字幕| 日本免费无遮挡吸乳视频电影| 亚洲国产成人精品激情| 永久免费看bbb| 新最免费影视大全在线播放| 久久亚洲精品无码播放| 久久精品视频免费看| 久久精品国产亚洲AV高清热| 成年女人视频网站免费m| 国产精品无码亚洲精品2021 | 一级毛片a免费播放王色电影 | 久久精品国产免费观看三人同眠 | 四虎成人免费观看在线网址 | 一区视频免费观看| 亚洲精品无码鲁网中文电影| 中文字幕在线免费观看| 亚洲熟女综合色一区二区三区| 成人免费视频国产| 最近的2019免费中文字幕| 亚洲宅男天堂a在线| 国产一级一片免费播放| 免费国产污网站在线观看| 亚洲an日韩专区在线| 亚洲AV永久无码精品一区二区国产| 国产免费区在线观看十分钟| 亚洲日韩中文字幕天堂不卡| 亚洲AV中文无码乱人伦| 18pao国产成视频永久免费| 精品一区二区三区无码免费直播| 亚洲中文字幕不卡无码|