Examples of PersistenceXML


Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream != null) {
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream != null) {
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            InputStream inStream = null;
               
            try {
                inStream = fileObject.openInputStream();
                XMLContext context = PersistenceXMLMappings.createXMLContext();
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);
   
                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        persistenceUnits.add(new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

        try {
            inStream1 = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream1 != null) {
                PersistenceXML persistenceXML;
               
                try {
                    // Try a 2.1 context first.
                    persistenceXML = (PersistenceXML) PersistenceXMLMappings.createXML2_1Context().createUnmarshaller().unmarshal(inStream1);
                } catch (Exception e) {
                    // Catch all exceptions and try a 2.0 context second with a new input stream.
                    inStream2 = getInputStream(filename, true);
                    persistenceXML = (PersistenceXML) PersistenceXMLMappings.createXML2_0Context().createUnmarshaller().unmarshal(inStream2);
                }

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

        InputStream inStream = null;

        try {
            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
            PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

            for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                // If no persistence unit list has been specified or one
                // has been specified and this persistence unit info's name
                // appears in that list then add it.
                if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                    persistenceUnits.add(new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

        InputStream inStream = null;

        try {
            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
            PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

            for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                // If no persistence unit list has been specified or one
                // has been specified and this persistence unit info's name
                // appears in that list then add it.
                if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                    persistenceUnits.add(new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream != null) {
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream != null) {
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXML

            XMLContext context = PersistenceXMLMappings.createXMLContext();
            inStream = getInputStream(filename, true);
           
            // If the persistence.xml was not found, then there is nothing to do.
            if (inStream != null) {
                PersistenceXML persistenceXML = (PersistenceXML) context.createUnmarshaller().unmarshal(inStream);

                for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
                    // If no persistence unit list has been specified or one
                    // has been specified and this persistence unit info's name
                    // appears in that list then add it.
                    if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
                        factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.