Examples of FieldsOfFloat


Examples of org.apache.jdo.tck.pc.fieldtypes.FieldsOfFloat

        Transaction tx = pm.currentTransaction();
        int i, n;
        Float firstValue = new Float(AllTypes.FLOAT_SMALLEST);
        Float secondValue = new Float(AllTypes.FLOAT_LARGEST);
        tx.begin();
        FieldsOfFloat pi = new FieldsOfFloat();
        pi.identifier = 1;
        pm.makePersistent(pi);
        Object oid = pm.getObjectId(pi);
        n = pi.getLength();
        // Provide initial set of values
        for( i = 0; i < n; ++i){
            pi.set( i, firstValue);
        }
        tx.commit();
        // cache will be flushed
        pi = null;
        System.gc();

        tx.begin();

        pi = (FieldsOfFloat) pm.getObjectById(oid, true);
        checkValues(oid, firstValue);

        // Provide new set of values
        for( i = 0; i < n; ++i){
            pi.set(i, secondValue);
        }
        tx.commit();
        // cache will be flushed
        pi = null;
        System.gc();
View Full Code Here

Examples of org.apache.jdo.tck.pc.fieldtypes.FieldsOfFloat

    }

    /** */
    private void checkValues(Object oid, Float startValue){
        int i;
        FieldsOfFloat pi = (FieldsOfFloat) pm.getObjectById(oid, true);
        int n = pi.getLength();
        for( i = 0; i < n; ++i){
            if( !FieldsOfFloat.isPersistent[i] ) continue;
            Float val = pi.get(i);
            if(!val.equals(startValue) ){
                fail(ASSERTION_FAILED,
                     "Incorrect value for " + FieldsOfFloat.fieldSpecs[i] +
                     ", expected value " + startValue.toString() +
                     ", value is " + val.toString());
View Full Code Here

Examples of org.apache.jdo.tck.pc.fieldtypes.FieldsOfFloat

        Transaction tx = pm.currentTransaction();
        int i, n;
        Float firstValue = new Float(AllTypes.FLOAT_SMALLEST);
        Float secondValue = new Float(AllTypes.FLOAT_LARGEST);
        tx.begin();
        FieldsOfFloat pi = new FieldsOfFloat();
        pi.identifier = 1;
        pm.makePersistent(pi);
        Object oid = pm.getObjectId(pi);
        n = pi.getLength();
        // Provide initial set of values
        for( i = 0; i < n; ++i){
            pi.set( i, firstValue);
        }
        tx.commit();
        // cache will be flushed
        pi = null;
        System.gc();

        tx.begin();

        pi = (FieldsOfFloat) pm.getObjectById(oid, true);
        checkValues(oid, firstValue);

        // Provide new set of values
        for( i = 0; i < n; ++i){
            pi.set(i, secondValue);
        }
        tx.commit();
        // cache will be flushed
        pi = null;
        System.gc();
View Full Code Here

Examples of org.apache.jdo.tck.pc.fieldtypes.FieldsOfFloat

    }

    /** */
    private void checkValues(Object oid, Float startValue){
        int i;
        FieldsOfFloat pi = (FieldsOfFloat) pm.getObjectById(oid, true);
        int n = pi.getLength();
        for( i = 0; i < n; ++i){
            if( !FieldsOfFloat.isPersistent[i] ) continue;
            Float val = pi.get(i);
            if(!val.equals(startValue) ){
                fail(ASSERTION_FAILED,
                     "Incorrect value for " + FieldsOfFloat.fieldSpecs[i] +
                     ", expected value " + startValue.toString() +
                     ", value is " + val.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.