Package org.apache.art

Examples of org.apache.art.UuidTestEntity


    }

    public void testUUID() throws Exception {

        ObjectContext context = createDataContext();
        UuidTestEntity test = context.newObject(UuidTestEntity.class);

        UUID id = UUID.randomUUID();
        test.setUuid(id);
        context.commitChanges();

        SelectQuery q = new SelectQuery(UuidTestEntity.class);
        UuidTestEntity testRead = (UuidTestEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getUuid());
        assertEquals(id, testRead.getUuid());

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

TOP

Related Classes of org.apache.art.UuidTestEntity

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.