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

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

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

    kapok

    垃圾桶,嘿嘿,我藏的這么深你們還能找到啊,真牛!

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      455 隨筆 :: 0 文章 :: 76 評論 :: 0 Trackbacks

    http://www.hibernate.org/218.html

    HyperJAXB - relational persistence for XML objects with JAXB and Hibernate

    What is HyperJAXB?

    HyperJAXB is an add-on for Sun's reference implementation of JAXB (Java Architecture for XML Binding). It provides JAXB objects with relational persistence layer using Hibernate.

    What can I do with HyperJAXB?

    HyperJAXB eases usage of XML with relational databases. With HyperJAXB you can combine JAXB and Hibernate to implement one of the following target usage scenarios:

    • load (unmarshal) object structure from XML document and save (persist) these objects in a relational database;
    • load objects from a relational database and present (marshal) loaded objects in XML form;
    • query relational database using HQL and present query results in XML.

    How it works?

    JAXB is basically a code generation engine. It accepts a schematic definition of you XML documents (usually in the form of an XML Schema) as input and generates source code of XML-enabled classes. HyperJAXB augments generated code by adding Hibernate XDoclet annotations. Added annotations effectively define Hibernate O/R mapping for the generated classes.

    Combination of JAXB RI, HyperJAXB and Hibernate toolset allows you automatically generate the following artifacts out of you XML Schema:

    • source code of XML-enabled objects with Hibernate XDoclet annotations;
    • object/relational mapping for Hibernate;
    • database schema for the target database.

    Please see the reference for more information.

    A code example?

    Unmarshalling and saving:

    // Unmarshall the document
    final MyObject myObject = (MyObject) unmarshaller.unmarshal(document);
    
    // Open the session, save object into the database
    final Session saveSession = sessionFactory.openSession();
    // Save id for the later use
    final String id = saveSession.save(myObject);
    saveSession.flush();
    // Close the session
    saveSession.close()
    

    Loading and marshalling:

    // Open the session, load the object
    final Session loadSession = sessionFactory.openSession();
    final MyObject myLoadedObject = (MyObject) loadSession.load(MyObject.class, id);
    loadSession.close();
    
    // Marshall loaded object into the document
    final Document loadedDocument = documentBuilder.newDocument();
    marshaller.marshal(myLoadedObject, loadedDocument);
    

    Mapping generated by HyperJAXB ensures that document and loadedDocument are identical.

    Where can I find it?

    Check out this project on https://hyperjaxb.dev.java.net.

    posted on 2005-05-24 20:30 笨笨 閱讀(607) 評論(0)  編輯  收藏 所屬分類: J2EEHibernateAndSpringALL
    主站蜘蛛池模板: 国产AV日韩A∨亚洲AV电影| 亚洲精品无码mⅴ在线观看| 一级毛片试看60分钟免费播放| 影音先锋在线免费观看| 亚洲a级成人片在线观看| 免费v片在线观看视频网站| 亚洲欧洲日产v特级毛片| 精品熟女少妇a∨免费久久| 久久精品国产亚洲av日韩| 9420免费高清在线视频| 666精品国产精品亚洲| 最近中文字幕电影大全免费版| 亚洲电影免费观看| 九九精品免费视频| 亚洲av成人中文无码专区| 国产亚洲精品免费| igao激情在线视频免费| 亚洲熟女少妇一区二区| 59pao成国产成视频永久免费| 91亚洲精品麻豆| 国产麻豆剧传媒精品国产免费 | 日韩午夜免费视频| 精品免费AV一区二区三区| 亚洲综合亚洲综合网成人| 嫩草成人永久免费观看| 亚洲欧洲尹人香蕉综合| 国产做床爱无遮挡免费视频| 巨胸喷奶水视频www免费视频| 亚洲天天在线日亚洲洲精| 国产成人精品久久免费动漫 | 一二三四在线观看免费中文在线观看 | 又爽又黄无遮挡高清免费视频| www免费黄色网| 亚洲码在线中文在线观看| 午夜一级免费视频| 曰批全过程免费视频在线观看无码 | 国产在线不卡免费播放| 全黄大全大色全免费大片| 亚洲另类精品xxxx人妖| 亚洲国产天堂久久综合| 久久成人国产精品免费软件|