Examples of TestEntity


Examples of org.apache.onami.persist.test.TestEntity

    @Override
    @Transactional( ignore = Exception.class )
    public void doTransactional()
        throws TestException, RuntimeTestException
    {
        storeEntity( new TestEntity() );
        doOtherTasks();
    }
View Full Code Here

Examples of org.apache.onami.persist.test.TestEntity

    @Before
    public void setUp()
    {
        super.setUp();

        firstEntity = new TestEntity();
        secondEntity = new TestEntity();
    }
View Full Code Here

Examples of org.apache.onami.persist.test.TestEntity

    @Test
    public void storeUnitsInTwoPersistenceUnits()
        throws Exception
    {
        // given
        final TestEntity firstEntity = new TestEntity();
        final TestEntity secondEntity = new TestEntity();

        // when
        firstEmp.get().persist( firstEntity );
        secondEmp.get().persist( secondEntity );

        // then
        assertNotNull( firstEmp.get().find( TestEntity.class, firstEntity.getId() ) );
        assertNotNull( secondEmp.get().find( TestEntity.class, secondEntity.getId() ) );
        assertNull( firstEmp.get().find( TestEntity.class, secondEntity.getId() ) );
        assertNull( secondEmp.get().find( TestEntity.class, firstEntity.getId() ) );
    }
View Full Code Here

Examples of org.apache.openjpa.tools.maven.testentity.TestEntity

        try
        {
            em.getTransaction().begin();

            TestEntity te = new TestEntity(1, "testentry");
           
            em.getTransaction().commit();
        }
        finally
        {
View Full Code Here

Examples of org.apache.openjpa.tools.maven.testentity.TestEntity

       
        try
        {
            em.getTransaction().begin();
           
            TestEntity entity = new TestEntity();
            entity.setInt1( 4711 );
            entity.setString1( "myVal" );
           
            em.persist( entity );
            em.getTransaction().commit();
        }
        finally
View Full Code Here

Examples of org.happyfaces.domain.TestEntity

        test.setStringField("stringField");
        test.setIntegerField(1);
        test.setLongField(2L);
        test.setBigDecimalField(BigDecimal.TEN);
        test.setDoubleField(2.2);
        TestEntity testEntity = new TestEntity();
        testEntity.setId(2L);
        test.setEntityField(testEntity);
       
        TestClass copy = ObjectUtils.copy(test, TestClass.class);
       
        Assert.assertEquals(test.getStringField(), copy.getStringField());
View Full Code Here

Examples of org.happyfaces.domain.TestEntity

        test.setStringField("stringField");
        test.setIntegerField(1);
        test.setLongField(2L);
        test.setBigDecimalField(BigDecimal.TEN);
        test.setDoubleField(2.2);
        TestEntity testEntity = new TestEntity();
        testEntity.setId(2L);
        test.setEntityField(testEntity);
       
        TestClass2 copy = new TestClass2();
       
        ObjectUtils.copy(test, copy, true);
View Full Code Here

Examples of org.happyfaces.domain.TestEntity

        test1.setStringField("stringField");
        test1.setIntegerField(1);
        test1.setLongField(2L);
        test1.setBigDecimalField(BigDecimal.TEN);
        test1.setDoubleField(2.2);
        TestEntity testEntity = new TestEntity();
        testEntity.setId(2L);
        test1.setEntityField(testEntity);
       
        TestClass test2 = new TestClass();
        test2.setStringField("stringField");
        test2.setIntegerField(1);
        test2.setLongField(2L);
        test2.setBigDecimalField(BigDecimal.TEN);
        test2.setDoubleField(2.2);
        TestEntity testEntity2 = new TestEntity();
        testEntity2.setId(1L);
        test2.setEntityField(testEntity2);
       
        List<TestClass> list = new ArrayList<ObjectUtilsTest.TestClass>();
        list.add(test1);
        list.add(test2);
View Full Code Here

Examples of org.happyfaces.domain.TestEntity

    }

    @Test
    public void testGetAsString() {
        EntityConverter converter = new EntityConverter();
        TestEntity testEntity = new TestEntity();
        testEntity.setId(110L);
        Assert.assertEquals("110_org.happyfaces.domain.TestEntity", converter.getAsString(null, null, testEntity));
    }
View Full Code Here

Examples of org.happyfaces.domain.TestEntity

    private static class DummyVariableService implements IVariableTypeService {

        @Override
        public BaseEntity findById(Class<? extends IEntity> entityClass, Long id) {
            TestEntity entity = new TestEntity();
            entity.setId(109L);
            return entity;
        }
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.