Java data JDO

Source: Internet
Author: User
General
  • Home
  • Why JDO?
  • JDO v JPA
  • JDO v JPA: API
  • JDO v JPA: Orm
  • Downloads
  • License
JDO implementation
  • Specifications
  • TCK
JDO usage
  • Implementations
  • API javadoc
  • Types of Classes
  • Types of fields
  • Metadata
    • Jdo dtd/XSD
    • Orm DTD/XSD
    • Jdoquery DTD/XSD
  • Bytecode Enhancement
  • Jdohelper
  • Persistencemanagerfactory
  • Persistencemanager
  • Transactions
  • Object states
  • Object Retrieval
  • Extents
  • Guides
  • References
  • Exceptions
  • Glossary
Community
  • Get Involved
  • Project Team
  • Mailing lists
  • FAQ
  • Wiki
Development
  • Roadmap/todo
  • Source code
  • Coding standards
  • Issue tracking
  • Dependencies

Persistence metadata

JDO 1.0 and JDO 2.0 support specification of persistence using XML Metadata. JDO 2.1 adds on the ability to specify persistence using java5 annotations.

XML Metadata

JDO (1.0.1, 2.0, 2.1) expects any XML Metadata to be specified in a file or files in particle positions in the file system. For example, if you have a classCom. mycompany. sample. myexample, JDO will look for any of the following files until it finds one (in the order stated ):-

META-INF/package.jdoWEB-INF/package.jdopackage.jdocom/package.jdocom/mycompany/package.jdocom/mycompany/sample/package.jdocom/mycompany/sample/MyExample.jdo

In addition to specifying XML Metadata inJDOFile, if defining o/R Mapping information you can also split this out into an ORM file. The locations for ORM files are similar in nature to those for JDO files.

META-INF/package-{mapping}.ormWEB-INF/package-{mapping}.ormpackage-{mapping}.ormcom/package-{mapping}.ormcom/mycompany/package-{mapping}.ormcom/mycompany/sample/package-{mapping}.ormcom/mycompany/sample/MyExample-{mapping}.orm

Where{Mapping}Is a property specified by the user and may be "MySQL" for ORM information for MySQL datastores, and "oracle" for ORM information for Oracle datastores, and so on.

Annotations

JDO 2.1 provides support for annotations. Classes and fields/properties can be annotated defining the persistence and, optionally, any ORM information.

Be an Apache Software Foundation connector sor
Thanks to ASF extends Sors! Documentation published: 06 November 2007

2005-2007 Apache Software Foundation

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.