Package testsuite.clusterj.model

Examples of testsuite.clusterj.model.LongvarbinaryPK


    /** Find all instances.
     */
    protected void find() {
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            byte[] key = getPK(i);
            LongvarbinaryPK result = session.find(LongvarbinaryPK.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) {
                LongvarbinaryPK instance = createInstance(i);
                instance.setName(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) {
                byte[] key = getPK(i);
                LongvarbinaryPK instance = session.find(LongvarbinaryPK.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) {
                LongvarbinaryPK instance = createInstance(i);
                session.deletePersistent(instance);
            }
        }
        // verify they have been deleted
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            if (0 == i % 5) {
                byte[] key = getPK(i);
                LongvarbinaryPK instance = session.find(LongvarbinaryPK.class, key);
                errorIfNotEqual("Failed to delete instance: " + i, null, instance);
            }
        }
    }
View Full Code Here

    /** The strategy for instances is for the "instance number" to create
     * the keys by creating a byte[] with the encoded number.
     */
    protected void createInstances() {
        for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) {
            LongvarbinaryPK instance = createInstance(i);
            if (getDebug()) System.out.println(toString(instance));
            instances.add(instance);
        }
    }
View Full Code Here

    /** Create an instance of LongvarbinaryPK.
     * @param index the index to use to generate data
     * @return the instance
     */
    protected LongvarbinaryPK createInstance(int index) {
        LongvarbinaryPK instance = session.newInstance(LongvarbinaryPK.class);
        instance.setId(getPK(index));
        instance.setNumber(index);
        instance.setName(getValue(index));
        return instance;
    }
View Full Code Here

TOP

Related Classes of testsuite.clusterj.model.LongvarbinaryPK

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.