Search in sources :

Example 6 with PersistenceUnitModel

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));
}
Also used : PersistenceUnitModel(org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceUnitModel)

Example 7 with PersistenceUnitModel

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;
}
Also used : PersistenceUnitModel(org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceUnitModel) PersistenceDescriptorModel(org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceDescriptorModel)

Aggregations

PersistenceUnitModel (org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceUnitModel)7 PersistenceDescriptorModel (org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceDescriptorModel)5 Property (org.kie.workbench.common.screens.datamodeller.model.persistence.Property)3 ArrayList (java.util.ArrayList)2 KieModule (org.kie.workbench.common.services.shared.project.KieModule)2 Overview (org.guvnor.common.services.shared.metadata.model.Overview)1 ValidationMessage (org.guvnor.common.services.shared.validation.model.ValidationMessage)1 PersistenceDescriptorEditorContent (org.kie.workbench.common.screens.datamodeller.model.persistence.PersistenceDescriptorEditorContent)1