Package com.impetus.client.crud.datatypes.entities

Examples of com.impetus.client.crud.datatypes.entities.StudentBigInteger


        if (!useSameEm)
        {
            em.close();
            em = emf.createEntityManager();
        }
        StudentBigInteger newStudent = em.find(StudentBigInteger.class,
                getRandomValue(BigInteger.class));
        Assert.assertNotNull(newStudent);
        Assert.assertEquals(getRandomValue(short.class), newStudent.getAge());
        Assert.assertEquals("Vivek", newStudent.getName());
        em.close();
    }
View Full Code Here


    public void testPersist(boolean useSameEm)
    {
        EntityManager em = emf.createEntityManager();

        // Insert max value of BigInteger
        StudentBigInteger studentMax = new StudentBigInteger();
        studentMax.setAge((Short) getMaxValue(short.class));
        studentMax.setId((BigInteger) getMaxValue(BigInteger.class));
        studentMax.setName((String) getMaxValue(String.class));
        em.persist(studentMax);

        // Insert min value of BigInteger
        StudentBigInteger studentMin = new StudentBigInteger();
        studentMin.setAge((Short) getMinValue(short.class));
        studentMin.setId((BigInteger) getMinValue(BigInteger.class));
        studentMin.setName((String) getMinValue(String.class));
        em.persist(studentMin);

        // Insert random value of BigInteger
        StudentBigInteger student = new StudentBigInteger();
        student.setAge((Short) getRandomValue(short.class));
        student.setId((BigInteger) getRandomValue(BigInteger.class));
        student.setName((String) getRandomValue(String.class));
        em.persist(student);
        em.close();
    }
View Full Code Here

TOP

Related Classes of com.impetus.client.crud.datatypes.entities.StudentBigInteger

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.