<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)  編輯  收藏 所屬分類: 框架

    主站蜘蛛池模板: 国产一卡2卡3卡4卡无卡免费视频| 美女视频黄.免费网址| 国产午夜精品久久久久免费视| 亚洲日韩人妻第一页| 瑟瑟网站免费网站入口| 无码不卡亚洲成?人片| 人人公开免费超级碰碰碰视频 | 亚洲精品成人av在线| 国产亚洲免费的视频看| 亚洲av色影在线| 久久免费看黄a级毛片| 亚洲最新中文字幕| 扒开双腿猛进入爽爽免费视频 | 国产AⅤ无码专区亚洲AV| 在线观看黄片免费入口不卡| 亚洲成熟xxxxx电影| 免费人成网站在线观看10分钟| 亚洲色一区二区三区四区| 日韩a级毛片免费视频| 九九九国产精品成人免费视频| 亚洲午夜国产精品无码| 国产亚洲精品AA片在线观看不加载| 久久久WWW成人免费精品| 亚洲男人都懂得羞羞网站| 国产日本一线在线观看免费| 黑人粗长大战亚洲女2021国产精品成人免费视频| 国产一区二区三区免费在线观看| 日韩精品无码永久免费网站| 亚洲AV无码久久精品色欲| 免费做爰猛烈吃奶摸视频在线观看| 蜜臀亚洲AV无码精品国产午夜.| 久久亚洲国产精品123区| **一级一级毛片免费观看| 亚洲欧洲免费无码| 亚欧色视频在线观看免费| 亚洲熟妇无码一区二区三区| 亚洲欧洲一区二区三区| 亚洲免费黄色网址| 免费在线观看自拍性爱视频| 亚洲经典在线中文字幕| 亚洲高清偷拍一区二区三区|