Package testsuite.clusterj.model

Examples of testsuite.clusterj.model.LongLongStringPK


    /** Find all instances.
     */
    protected void find() {
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            Object[] key = new Object[]{getPK1(i), getPK2(i), getPK3(i)};
            LongLongStringPK result = session.find(LongLongStringPK.class, key);
            verify(result, i, false);
        }
    }
View Full Code Here


     */
    protected void update() {
        // update the instances
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            if (0 == i % 4) {
                LongLongStringPK instance = createInstance(i);
                instance.setStringvalue(getValue(NUMBER_OF_INSTANCES - i));
                session.updatePersistent(instance);
                verify(instance, i, true);
            }
        }
        // verify the updated instances
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            if (0 == i % 4) {
                Object[] key = new Object[]{getPK1(i), getPK2(i), getPK3(i)};
                LongLongStringPK instance = session.find(LongLongStringPK.class, key);
                verify(instance, i, true);
            }
        }
    }
View Full Code Here

     */
    protected void delete() {
        // delete the instances
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            if (0 == i % 5) {
                LongLongStringPK instance = createInstance(i);
                session.deletePersistent(instance);
            }
        }
        // verify they have been deleted
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            if (0 == i % 5) {
                Object[] key = new Object[]{getPK1(i), getPK2(i), getPK3(i)};
                LongLongStringPK instance = session.find(LongLongStringPK.class, key);
                errorIfNotEqual("Failed to delete instance: " + i, null, instance);
            }
        }
    }
View Full Code Here

     * pk1 * PK_MODULUS^2 + pk2 * PK_MODULUS + pk3
     *
     */
    protected void createInstances() {
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            LongLongStringPK instance = createInstance(i);
//            System.out.println(toString(instance));
            instances.add(instance);
        }
    }
View Full Code Here

    /** Create an instance of LongLongStringPK.
     * @param index the index to use to generate data
     * @return the instance
     */
    protected LongLongStringPK createInstance(int index) {
        LongLongStringPK instance = session.newInstance(LongLongStringPK.class);
        instance.setLongpk1(getPK1(index));
        instance.setLongpk2(getPK2(index));
        instance.setStringpk(getPK3(index));
        instance.setStringvalue(getValue(index));
        return instance;
    }
View Full Code Here

TOP

Related Classes of testsuite.clusterj.model.LongLongStringPK

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.