Package com.force.sdk.jpa.schema.entities

Examples of com.force.sdk.jpa.schema.entities.StandardFieldLinkingEntity


     */
    public void testLinkStandardFields() {
        emfac = Persistence.createEntityManagerFactory("testStandardFieldLinking", dynamicOrgConfig);
        em = emfac.createEntityManager();
        EntityTransaction tx = em.getTransaction();
        StandardFieldLinkingEntity entity = new StandardFieldLinkingEntity();
       
        try {
            tx.begin();
            entity.setName(StandardFieldLinkingEntity.class.getSimpleName());
            em.persist(entity);
            Assert.assertTrue(em.contains(entity), "The entity was not stored to the database.");
            tx.commit();
            StandardFieldLinkingEntity retrieve = em.find(StandardFieldLinkingEntity.class, entity.getId());
            Assert.assertEquals(retrieve.getName(), StandardFieldLinkingEntity.class.getSimpleName(),
                    "Entity was not retrieved properly.");
            Set<Attribute<? super StandardFieldLinkingEntity, ?>> attributes =
                em.getMetamodel().entity(StandardFieldLinkingEntity.class).getAttributes();
            Set<Field> s = removeJDOFields(StandardFieldLinkingEntity.class);
            Assert.assertEquals(attributes.size(), s.size(), "There was an unexpected number of attributes.");
View Full Code Here

TOP

Related Classes of com.force.sdk.jpa.schema.entities.StandardFieldLinkingEntity

Copyright © 2018 www.massapicom. 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.