<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 笨笨 閱讀(607) 評論(0)  編輯  收藏 所屬分類: J2EEHibernateAndSpringALL
    主站蜘蛛池模板: 成人无码精品1区2区3区免费看| 国产视频精品免费视频| 精品免费国产一区二区三区| mm1313亚洲国产精品无码试看 | jjizz全部免费看片| 亚洲乱码在线播放| 亚洲精品成人在线| 久久精品人成免费| 精品视频免费在线| 亚洲av鲁丝一区二区三区| 成人a视频片在线观看免费| 国产视频精品免费视频| 伊人久久亚洲综合影院首页| 中文字幕亚洲日韩无线码| 18禁止观看免费私人影院| 一本大道一卡二大卡三卡免费 | 欧洲亚洲国产精华液| 亚洲国产老鸭窝一区二区三区| 大香人蕉免费视频75| a在线视频免费观看| 亚洲AV成人一区二区三区观看 | 久久精品乱子伦免费| 亚洲日本VA午夜在线电影| 亚洲va久久久噜噜噜久久 | 亚洲?V无码成人精品区日韩| 亚洲一区二区三区免费观看 | 妞干网在线免费视频| 成人黄网站片免费视频| 狠狠综合亚洲综合亚洲色| 亚洲色图校园春色| 亚洲va久久久噜噜噜久久 | 亚洲精品无码mv在线观看网站| 成人免费777777| 最近高清中文字幕免费| 国产一级a毛一级a看免费人娇| 337P日本欧洲亚洲大胆艺术图| 亚洲精品国产福利在线观看| 亚洲国产精品成人精品无码区| 在线观看91精品国产不卡免费| 日本精品人妻无码免费大全| 99热在线观看免费|