Examples of StateManagerImpl


Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.getTransaction().commit();
        em.clear();

        // Find the entity and retrieve the objectId we use internally
        BasicEntity persistedEntity = em.find(BasicEntity.class, entity.getId());
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, entity.getId()));
        Object o = JPAFacadeHelper.toOpenJPAObjectId(cmd, entity.getId());
        assertEquals(o, JPAFacadeHelper.toOpenJPAObjectId(cmd, o));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        Person persistedEntity = em.find(Person.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        DoubleObjIdEntity persistedEntity = em.find(DoubleObjIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        FloatIdEntity persistedEntity = em.find(FloatIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        BooleanIdEntity persistedEntity = em.find(BooleanIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        StringIdEntity persistedEntity = em.find(StringIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        SQLBigIntegerIdEntity persistedEntity = em.find(SQLBigIntegerIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        SQLBigDecimalIdEntity persistedEntity = em.find(SQLBigDecimalIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        SQLDateIdEntity persistedEntity = em.find(SQLDateIdEntity.class, id);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.StateManagerImpl

        em.persist(entity);
        em.getTransaction().commit();
        em.clear();

        EDSQLDateID persistedEntity = em.find(EDSQLDateID.class, d);
        StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
        Object oid = smi.getObjectId();

        assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, d));
    }
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.