/** * 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; }
/** 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); }
/** 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); }
new PersistenceClassElementImpl(jdoClassName); persistElImpl.setKeyClass(jdoClassName+".Oid"); //NOI18N mce = new MappingClassElementImpl( new PersistenceClassElement(persistElImpl));