use of org.datanucleus.api.jdo.metadata.InterfaceMetadataImpl in project datanucleus-api-jdo by datanucleus.
the class JDOPersistenceManagerFactory method getMetadata.
/**
* Method to return the (class) metadata object for the specified class, if there is
* metadata defined for that class.
* @param className Name of the class that we want metadata for
* @return The metadata
*/
public javax.jdo.metadata.TypeMetadata getMetadata(String className) {
MetaDataManager mmgr = nucleusContext.getMetaDataManager();
AbstractClassMetaData acmd = mmgr.getMetaDataForClass(className, nucleusContext.getClassLoaderResolver(null));
if (acmd == null) {
return null;
}
if (acmd instanceof ClassMetaData) {
return new ClassMetadataImpl((ClassMetaData) acmd);
}
return new InterfaceMetadataImpl((InterfaceMetaData) acmd);
}
Aggregations