org.datanucleus.metadata
Class MetaDataMerger
java.lang.Object
org.datanucleus.metadata.MetaDataMerger
public class MetaDataMerger
- extends java.lang.Object
Convenience class to handle the merging of MetaData.
This is used in the following situations
- JDO : Merging ORM MetaData into JDO MetaData
- JPA : Merging Annotations information into JPA MetaData
- JDO : Merging Annotations information into JDO MetaData
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALISER
protected static Localiser LOCALISER
MetaDataMerger
public MetaDataMerger()
mergeFileORMData
public static void mergeFileORMData(FileMetaData primaryFmd,
FileMetaData ormFmd)
- Method to take a file JDO MetaData definition and merge in the ORM MetaData definition.
If something is specified in the JDO MetaData and also in the ORM MetaData then the ORM MetaData takes precedence.
- Parameters:
primaryFmd - The JDO Field definition (to be updated)ormFmd - The ORM Field definition (to be merged into the JDO Field definition)
- Throws:
NucleusException - if an error occurs while merging the ORM info
mergeClassORMData
public static void mergeClassORMData(AbstractClassMetaData primaryCmd,
AbstractClassMetaData ormCmd,
MetaDataManager mmgr)
- Method to take a class JDO MetaData definition and merge in the ORM MetaData definition.
If something is specified in the JDO MetaData and also in the ORM MetaData then the ORM MetaData takes precedence.
This is tied pretty intrinsically to the AbstractClassMetaData class and so could have been included there.
- Parameters:
primaryCmd - The JDO Class definition (to be updated)ormCmd - The ORM Class definition (to be merged into the JDO Class definition)mmgr - MetaData manager
- Throws:
NucleusException - if an error occurs while merging the ORM info
mergeClassAnnotationsData
public static void mergeClassAnnotationsData(AbstractClassMetaData primaryCmd,
AbstractClassMetaData annotCmd,
MetaDataManager mmgr)
- Method to take a class MetaData definition and merge in any Annotations "MetaData" definition.
If something is specified in the MetaData and also in the annotations then the MetaData takes precedence.
This is tied pretty intrinsically to the AbstractClassMetaData class and so could have been included there.
- Parameters:
primaryCmd - The MetaData definition (to be updated)annotCmd - The annotations Class definition (to be merged into the MetaData definition)mmgr - MetaData manager
- Throws:
NucleusException - if an error occurs while merging the annotations info
Copyright © 2010. All Rights Reserved.