use of org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceUnitModel in project kie-wb-common by kiegroup.
the class DOM2PersistenceDescriptorVisitor method visitPersistenceUnit.
private void visitPersistenceUnit(Element element) {
PersistenceUnitModel persistenceUnit = new PersistenceUnitModel();
descriptorModel.setPersistenceUnit(persistenceUnit);
persistenceUnit.setName(element.getAttribute(PersistenceDescriptorXMLMarshaller.NAME));
String transactionType = element.getAttribute(PersistenceDescriptorXMLMarshaller.TRANSACTION_TYPE);
persistenceUnit.setTransactionType(parseTransactionType(transactionType));
visitDescription(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.DESCRIPTION));
visitProvider(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.PROVIDER));
visitJTADataSource(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.JTA_DATA_SOURCE));
visitNonJTADataSource(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.NON_JTA_DATA_SOURCE));
visitMappingFile(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.MAPPING_FILE));
visitJarFile(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.JAR_FILE));
visitClass(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.CLASS));
visitExcludeUnlistedClasses(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.EXCLUDE_UNLISTED_CLASSES));
visitSharedCacheMode(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.SHARED_CACHE_MODE));
visitValidationMode(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.VALIDATION_MODE));
visitProperties(persistenceUnit, element.getElementsByTagName(PersistenceDescriptorXMLMarshaller.PROPERTIES));
}
use of org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceUnitModel in project kie-wb-common by kiegroup.
the class DataModelerEventObserverTest method createModel.
private PersistenceDescriptorModel createModel() {
PersistenceDescriptorModel descriptorModel = new PersistenceDescriptorModel();
descriptorModel.setPersistenceUnit(new PersistenceUnitModel());
return descriptorModel;
}
Aggregations