Package org.apache.isis.core.tck.dom.refs

Examples of org.apache.isis.core.tck.dom.refs.SimpleEntity


       
        // then find none
        assertFalse(hasInstances);
       
        // given now persisted
        final SimpleEntity epv2 = iswf.fixtures.smpl2;
        epv2.setName("foo");
        epv2.setDate(new Date());
        epv2.setNullable(1234567890L);
        epv2.setSize(123);
       
        iswf.persist(epv2);

        iswf.bounceSystem();
       
View Full Code Here


        iswf.bounceSystem();
       
        // when change
        adapter = iswf.reload(oid);
       
        SimpleEntity epv = (SimpleEntity) adapter.getObject();
        epv.setName("changed");

        iswf.bounceSystem();

        // then found
        List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
View Full Code Here

        // when destroy
        iswf.beginTran();
        adapter = iswf.reload(oid);
       
        SimpleEntity epv = (SimpleEntity) adapter.getObject();
        iswf.destroy(epv);
        iswf.commitTran();

        iswf.bounceSystem();
View Full Code Here

        final ObjectAdapter readObject = objectReader.load(reader1, versionCreator, dataEncrypter);
        assertEquals(oid3, readObject.getOid());
        assertEquals(ResolveState.RESOLVED, readObject.getResolveState());

        final SimpleEntity pojo = (SimpleEntity) readObject.getObject();
        assertEquals("Fred Smith", pojo.getName());
        assertEquals(34, pojo.getSize());

        context.assertIsSatisfied();
    }
View Full Code Here

        final ObjectAdapter readObject = getAdapterManager().adapterFor(RootOidDefault.create(ObjectSpecId.of("SMPL"), ""+4));

        objectReader.update(reader1, versionCreator, dataEncrypter, readObject);

        final SimpleEntity pojo = (SimpleEntity) readObject.getObject();
        assertEquals("Fred Smith", pojo.getName());
        assertEquals(34, pojo.getSize());

        context.assertIsSatisfied();
    }
View Full Code Here

    }

    @Test
    public void recreateObject_valuePreserved() throws Exception {
        recreatedAdapter = mementoForEpv1.recreateObject();
        final SimpleEntity recreatedObject = (SimpleEntity)recreatedAdapter.getObject();
        assertEquals("Fred", recreatedObject.getName());
    }
View Full Code Here

    @Test
    public void recreateObject_referencePreserved() throws Exception {
        recreatedAdapter = mementoForEpr1.recreateObject();
        final ReferencingEntity recreatedObject = (ReferencingEntity)recreatedAdapter.getObject();
        final SimpleEntity reference1 = recreatedObject.getReference();
        assertNotNull(reference1);
       
        assertThat("Fred", equalTo(reference1.getName()));
    }
View Full Code Here

        final ParentEntity recreatedObject = (ParentEntity)recreatedAdapter.getObject();
        final List<BaseEntity> hetrogenousCollection = recreatedObject.getHeterogeneousCollection();
        assertNotNull(hetrogenousCollection);
       
        assertThat(hetrogenousCollection.size(), is(2));
        final SimpleEntity firstObj = (SimpleEntity)hetrogenousCollection.get(0);
        assertThat(firstObj.getName(), is("Fred"));
       
        final ReferencingEntity secondObj = (ReferencingEntity)hetrogenousCollection.get(1);
        final SimpleEntity reference1 = secondObj.getReference();
        assertThat(reference1.getName(), is("Fred"));
       
        assertSame(firstObj, reference1);
    }
View Full Code Here

       
        // then find none
        assertFalse(hasInstances);
       
        // given now persisted
        final SimpleEntity epv2 = iswf.fixtures.smpl2;
        epv2.setName("foo");
        epv2.setDate(new Date());
        epv2.setNullable(1234567890L);
        epv2.setSize(123);
       
        iswf.persist(epv2);

        iswf.bounceSystem();
       
View Full Code Here

        iswf.bounceSystem();
       
        // when change
        adapter = iswf.reload(oid);
       
        SimpleEntity epv = (SimpleEntity) adapter.getObject();
        epv.setName("changed");

        iswf.bounceSystem();

        // then found
        List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
View Full Code Here

TOP

Related Classes of org.apache.isis.core.tck.dom.refs.SimpleEntity

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.