Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI.createEntityManager()


        OpenJPAPersistence.createEntityManagerFactory(
                "no-pre-update-default-validation-group",
                "org/apache/openjpa/integration/validation/persistence.xml");
        assertNotNull(emf);

        OpenJPAEntityManager em = emf.createEntityManager();
        assertNotNull(em);
        try {
            DefGrpEntity dge = new DefGrpEntity();
            dge.setDgName("NotNull");
            try {
View Full Code Here


                "simple",
                "org/apache/openjpa/persistence/validation/persistence.xml",
                prop);
        assertNotNull(emf);
        try {
            final OpenJPAEntityManagerSPI em = emf.createEntityManager();
            final OpenJPAEntityManagerSPI em2 = emf.createEntityManager();
            UniqueLifecycleListener l1 = new UniqueLifecycleListener();
            UniqueLifecycleListener l2 = new UniqueLifecycleListener();
            em.addLifecycleListener(l1, (Class<?>[])null);
            em2.addLifecycleListener(l2, (Class<?>[])null);
View Full Code Here

                "org/apache/openjpa/persistence/validation/persistence.xml",
                prop);
        assertNotNull(emf);
        try {
            final OpenJPAEntityManagerSPI em = emf.createEntityManager();
            final OpenJPAEntityManagerSPI em2 = emf.createEntityManager();
            UniqueLifecycleListener l1 = new UniqueLifecycleListener();
            UniqueLifecycleListener l2 = new UniqueLifecycleListener();
            em.addLifecycleListener(l1, (Class<?>[])null);
            em2.addLifecycleListener(l2, (Class<?>[])null);
View Full Code Here

            dict instanceof SolidDBDictionary || dict instanceof HSQLDictionary)) {
            closeEMF(tempEmf);
            return;
        }
       
        OpenJPAEntityManagerSPI em = tempEmf.createEntityManager();
        String[] schemas =
            { "SCHEMA1", "SCHEMA2", "SCHEMA3", "SCHEMA3G", "SCHEMA4G" };
        for (String schema : schemas) {
            try {
                em.getTransaction().begin();
View Full Code Here

        OpenJPAPersistence.createEntityManagerFactory(
                "null-none-mode",
                "org/apache/openjpa/integration/validation/persistence.xml");
        assertNotNull(emf);
        // create EM
        OpenJPAEntityManager em = emf.createEntityManager();
        assertNotNull(em);
        try {
            // verify Validation Mode
            OpenJPAConfiguration conf = em.getConfiguration();
            assertNotNull(conf);
View Full Code Here

            .createEntityManagerFactory(
                "null-callback-mode",
                "org/apache/openjpa/integration/validation/persistence.xml");
        assertNotNull(emf);
        // create EM
        em = emf.createEntityManager();
        assertNotNull(em);
        try {
            // verify Validation Mode
            OpenJPAConfiguration conf = em.getConfiguration();
            assertNotNull(conf);
View Full Code Here

            OpenJPAPersistence.createEntityManagerFactory(
                "null-none-mode",
                "org/apache/openjpa/integration/validation/persistence.xml");
        assertNotNull(emf);
        // create EM
        OpenJPAEntityManager em = emf.createEntityManager();
        assertNotNull(em);
        try {
            // verify Validation Mode
            OpenJPAConfiguration conf = em.getConfiguration();
            assertNotNull(conf);
View Full Code Here

                            OpenJPAPersistence.createEntityManagerFactory(
                                    "address-none-mode",
                                    "org/apache/openjpa/integration/validation/persistence.xml");
            assertNotNull(emf);
            // create EM
            OpenJPAEntityManager em = emf.createEntityManager();
            assertNotNull(em);
            try{
                // verify Validation Mode
                OpenJPAConfiguration conf = em.getConfiguration();
                assertNotNull(conf);
View Full Code Here

        }


        // Part 2 - Create a Person entity that uses the invalid address above
        {
            OpenJPAEntityManager em = emf.createEntityManager();
            assertNotNull(em);
            try {
                // verify Validation Mode
                OpenJPAConfiguration conf = em.getConfiguration();
                assertNotNull(conf);
View Full Code Here

    /**
     * Create sequence so that the test does not require manual intervention in database.
     */
    private void createSequence(String sequence) {
        OpenJPAEntityManagerFactorySPI factorySPI = createEMF();
        OpenJPAEntityManagerSPI em = factorySPI.createEntityManager();

        try {
            em.getTransaction().begin();
            Query q = em.createNativeQuery("CREATE SEQUENCE " + sequence + " START WITH 1");
            q.executeUpdate();
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.