Search in sources :

Example 11 with ParsedPersistenceXmlDescriptor

use of org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor in project jbosstools-hibernate by jbosstools.

the class OpenMappingUtilsEjb3 method enumDocuments.

public static List<String> enumDocuments(String persistenceUnitName, EntityResolver entityResolver) {
    List<String> result = new ArrayList<String>();
    List<ParsedPersistenceXmlDescriptor> persistenceUnits = PersistenceXmlParser.locatePersistenceUnits(new Properties());
    for (ParsedPersistenceXmlDescriptor descriptor : persistenceUnits) {
        if (descriptor.getName().equals(persistenceUnitName)) {
            result.addAll(descriptor.getMappingFileNames());
        }
    }
    return result;
}
Also used : ParsedPersistenceXmlDescriptor(org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor) ArrayList(java.util.ArrayList) Properties(java.util.Properties)

Example 12 with ParsedPersistenceXmlDescriptor

use of org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor in project jbosstools-hibernate by jbosstools.

the class JpaMappingFileHelper method findMappingFiles.

public static List<String> findMappingFiles(String persistenceUnitName) {
    List<String> result = new ArrayList<String>();
    List<ParsedPersistenceXmlDescriptor> persistenceUnits = PersistenceXmlParser.locatePersistenceUnits(new Properties());
    for (ParsedPersistenceXmlDescriptor descriptor : persistenceUnits) {
        if (descriptor.getName().equals(persistenceUnitName)) {
            result.addAll(descriptor.getMappingFileNames());
        }
    }
    return result;
}
Also used : ParsedPersistenceXmlDescriptor(org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor) ArrayList(java.util.ArrayList) Properties(java.util.Properties)

Example 13 with ParsedPersistenceXmlDescriptor

use of org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor in project jbosstools-hibernate by jbosstools.

the class JpaMappingFileHelper method findMappingFiles.

public static List<String> findMappingFiles(String persistenceUnitName) {
    List<String> result = new ArrayList<String>();
    List<ParsedPersistenceXmlDescriptor> persistenceUnits = PersistenceXmlParser.locatePersistenceUnits(new Properties());
    for (ParsedPersistenceXmlDescriptor descriptor : persistenceUnits) {
        if (descriptor.getName().equals(persistenceUnitName)) {
            result.addAll(descriptor.getMappingFileNames());
        }
    }
    return result;
}
Also used : ParsedPersistenceXmlDescriptor(org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor) ArrayList(java.util.ArrayList) Properties(java.util.Properties)

Example 14 with ParsedPersistenceXmlDescriptor

use of org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor in project jbosstools-hibernate by jbosstools.

the class OpenMappingUtilsEjb3 method enumDocuments.

public static List<String> enumDocuments(String persistenceUnitName, EntityResolver entityResolver) {
    List<String> result = new ArrayList<String>();
    List<ParsedPersistenceXmlDescriptor> persistenceUnits = PersistenceXmlParser.locatePersistenceUnits(new Properties());
    for (ParsedPersistenceXmlDescriptor descriptor : persistenceUnits) {
        if (descriptor.getName().equals(persistenceUnitName)) {
            result.addAll(descriptor.getMappingFileNames());
        }
    }
    return result;
}
Also used : ParsedPersistenceXmlDescriptor(org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor) ArrayList(java.util.ArrayList) Properties(java.util.Properties)

Example 15 with ParsedPersistenceXmlDescriptor

use of org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor in project jbosstools-hibernate by jbosstools.

the class JpaMappingFileHelper method findMappingFiles.

public static List<String> findMappingFiles(String persistenceUnitName) {
    List<String> result = new ArrayList<String>();
    List<ParsedPersistenceXmlDescriptor> persistenceUnits = PersistenceXmlParser.locatePersistenceUnits(new Properties());
    for (ParsedPersistenceXmlDescriptor descriptor : persistenceUnits) {
        if (descriptor.getName().equals(persistenceUnitName)) {
            result.addAll(descriptor.getMappingFileNames());
        }
    }
    return result;
}
Also used : ParsedPersistenceXmlDescriptor(org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor) ArrayList(java.util.ArrayList) Properties(java.util.Properties)

Aggregations

ParsedPersistenceXmlDescriptor (org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor)16 ArrayList (java.util.ArrayList)10 Properties (java.util.Properties)10 Test (org.junit.Test)3 URL (java.net.URL)2 EntityManagerFactory (javax.persistence.EntityManagerFactory)2 Transaction (javax.transaction.Transaction)2 TransactionManager (javax.transaction.TransactionManager)2 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)2 JBossAppServerJtaPlatform (org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform)2 JtaPlatform (org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform)2 BuildStep (io.quarkus.deployment.annotations.BuildStep)1 File (java.io.File)1 InputStream (java.io.InputStream)1 Map (java.util.Map)1 PersistenceException (javax.persistence.PersistenceException)1 PersistenceUnitTransactionType (javax.persistence.spi.PersistenceUnitTransactionType)1 UserTransaction (javax.transaction.UserTransaction)1 StandardScanOptions (org.hibernate.boot.archive.scan.internal.StandardScanOptions)1 StandardScanner (org.hibernate.boot.archive.scan.internal.StandardScanner)1