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

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

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

    kapok

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

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      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 笨笨 閱讀(614) 評論(0)  編輯  收藏 所屬分類: J2EEHibernateAndSpringALL
    主站蜘蛛池模板: 亚洲日韩精品无码AV海量| 亚洲精品无码久久久久久久| 亚洲熟妇AV一区二区三区浪潮| 91青青青国产在观免费影视| 亚洲AV福利天堂一区二区三| 久久精品国产免费| 亚洲一区二区三区日本久久九| 久久青草免费91观看| 久久久亚洲欧洲日产国码是AV | 国产午夜亚洲精品不卡电影| 亚洲免费中文字幕| 午夜在线免费视频| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 性短视频在线观看免费不卡流畅| 亚洲一级视频在线观看| 成人a免费α片在线视频网站| 亚洲欧美日韩一区二区三区在线| 国产免费小视频在线观看| 一级日本高清视频免费观看| 国产日韩亚洲大尺度高清| 亚洲av无码一区二区三区在线播放| 国产精品国产午夜免费福利看| 男人免费视频一区二区在线观看| 亚洲精品乱码久久久久久| 精品国产污污免费网站aⅴ| 亚洲精品V欧洲精品V日韩精品| 日韩精品无码免费专区午夜| 亚洲欧洲日产国码在线观看| 拍拍拍又黄又爽无挡视频免费| 美女免费精品高清毛片在线视| 亚洲情综合五月天| 韩国免费一级成人毛片| 一区二区三区AV高清免费波多| 亚洲级αV无码毛片久久精品| 无遮免费网站在线入口| 黄页网站在线视频免费| 亚洲美女视频免费| 亚洲国产成人a精品不卡在线| 久久久久久成人毛片免费看| 亚洲色无码专区一区| 国产亚洲综合色就色|