|
|
(17 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | {{EclipseLink_UserGuide
| |
− | |eclipselink=y
| |
− | |eclipselinktype=MOXy
| |
− | |info=y
| |
− | |api=y
| |
− | |apis= * [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/jaxb/metadata/MetadataSource.html MetadataSource]
| |
− | * [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/jaxb/metadata/MetadataSourceAdapter.html MetadataSourceAdapter]
| |
− | * [http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/jaxb/metadata/XMLMetadataSource.html XMLMetadataSource]
| |
− | |toc=y
| |
− | }}
| |
| | | |
− | = XML MetadataSource =
| |
− |
| |
− | EclipseLink '''2.3''' introduces the concept of a '''MetadataSource''', which is responsible for serving up EclipseLink metadata. This allows you to store mapping information outside of your application and have it retrieved when the application's '''JAXBContext''' is being created or refreshed.
| |
− |
| |
− |
| |
− | == Implementing a MetadataSource ==
| |
− |
| |
− | To implement your own '''MetadataSource''', you can:
| |
− |
| |
− | * Create a new class that implements the '''org.eclipse.persistence.jaxb.metadata.MetadataSource''' interface
| |
− | * Create a new class that extends the '''org.eclipse.persistence.jaxb.metadata.MetadataSourceAdapter''' class
| |
− |
| |
− | Using the '''MetadataSourceAdapter''' is preferred, as it will insulate you from future additions to the interface.
| |