use of com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl in project Payara by payara.
the class DatabaseGenerator method createMappingClass.
/**
* Create mapping class and associated table and PC class
* @param pcClass PC class that mapping class associated
* @param table table element that mapping class associated
* @return MappingClassElement associated with table and PC class
* @throws ModelException
*/
private MappingClassElement createMappingClass(PersistenceClassElement pcClass, TableElement table) throws ModelException {
MappingClassElement mappingClass = new MappingClassElementImpl(pcClass);
mappingClass.setDatabaseRoot(schema);
mappingClass.addTable(table);
return mappingClass;
}
use of com.sun.jdo.api.persistence.model.mapping.impl.MappingClassElementImpl in project Payara by payara.
the class Model method createSkeletonMappingClass.
/**
* Creates a PersistenceClassElement with the specified name, then wraps
* it in a mapping class and stores it in the hash map of classes.
* This is the first phase of converting a class to be persistence-capable.
* @param className the fully qualified name of the class
* @see #convertDefaultFields
* @see #updateKeyForClass
*/
private void createSkeletonMappingClass(String className) {
PersistenceClassElement element = new PersistenceClassElement(new PersistenceClassElementImpl(className));
updateKeyForClass(new MappingClassElementImpl(element), null);
}
Aggregations