Package testsuite.clusterj.model

Examples of testsuite.clusterj.model.NullValues


        tx = session.currentTransaction();
        // make sure we can commit a legal instance.
        if (true) {
            tx.begin();
            NullValues instance = createValidInstance();
            int id = 0;
            instance.setId(id);
            session.makePersistent(instance);
            tx.commit();
            tx.begin();
            instance = session.find(NullValues.class, id);
            session.deletePersistent(instance);
            tx.commit();
        }
        // iterate all property and field types and set the value of the
        // field to null and then commit.
        for (int propertyType = 0; propertyType < numberOfPropertyTypes; ++propertyType) {
            for (int fieldIndex = 0; fieldIndex < numberOfFieldsPerProperty; ++fieldIndex) {
                NullValues instance = createValidInstance();
                int id = propertyType * numberOfFieldsPerProperty + fieldIndex;
                //System.out.println("id: " + id);
                instance.setId(id);
                try {
                    tx.begin();
                    // set one property to null value
                    setValue(instance, propertyType, fieldIndex, true);
                    // and see what happens
View Full Code Here


        }
        failOnError();
    }

    protected NullValues createValidInstance() {
        NullValues instance = session.newInstance(NullValues.class);
        for (int propertyType = 0; propertyType < numberOfPropertyTypes; ++propertyType) {
            for (int fieldIndex = 0; fieldIndex < numberOfFieldsPerProperty; ++fieldIndex) {
                // set all properties to non-null values
                setValue(instance, propertyType, fieldIndex, false);
            }
View Full Code Here

TOP

Related Classes of testsuite.clusterj.model.NullValues

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.