Package org.apache.art

Examples of org.apache.art.BigIntegerEntity


    }

    public void testMOD() {
        ObjectContext context = createDataContext();

        BigIntegerEntity o1 = context
                .newObject(BigIntegerEntity.class);
        o1.setBigIntegerField(new BigInteger("9"));

        BigIntegerEntity o2 = context
                .newObject(BigIntegerEntity.class);
        o2.setBigIntegerField(new BigInteger("10"));

        context.commitChanges();

        EJBQLQuery query = new EJBQLQuery(
                "SELECT d FROM BigIntegerEntity d WHERE MOD(d.bigIntegerField, 4) = 2");
View Full Code Here


        context.commitChanges();
    }

    public void testBigInteger() throws Exception {

        BigIntegerEntity test = context
                .newObject(BigIntegerEntity.class);

        BigInteger i = new BigInteger("1234567890");
        test.setBigIntegerField(i);
        context.commitChanges();

        SelectQuery q = new SelectQuery(BigIntegerEntity.class);
        BigIntegerEntity testRead = (BigIntegerEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getBigIntegerField());
        assertEquals(i, testRead.getBigIntegerField());

        test.setBigIntegerField(null);
        context.commitChanges();
    }
View Full Code Here

TOP

Related Classes of org.apache.art.BigIntegerEntity

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.