Examples of FieldsOfPrimitiveint


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

    void runTest(PersistenceManager pm)
    {
        Transaction tx = pm.currentTransaction();
        int i, n, value;
        tx.begin();
        FieldsOfPrimitiveint pi = new FieldsOfPrimitiveint();
        pi.identifier = 1;
        pm.makePersistent(pi);
        Object oid = pm.getObjectId(pi);
        n = pi.getLength();
        // Provide initial set of values
        for( i = 0, value = 0; i < n; ++i, ++value ){
            pi.set( i, value);           
        }
        tx.commit();
        // cache will be flushed       
        pi = null;
        System.gc();
   
        tx.begin();
        pi = (FieldsOfPrimitiveint) pm.getObjectById(oid, true);
        checkValues(oid, 0); // check if persistent fields have values set

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

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

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

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

    void runTest(PersistenceManager pm)
    {
        Transaction tx = pm.currentTransaction();
        int i, n, value;
        tx.begin();
        FieldsOfPrimitiveint pi = new FieldsOfPrimitiveint();
        pi.identifier = 1;
        pm.makePersistent(pi);
        Object oid = pm.getObjectId(pi);
        n = pi.getLength();
        // Provide initial set of values
        for( i = 0, value = 0; i < n; ++i, ++value ){
            pi.set( i, value);           
        }
        tx.commit();
        // cache will be flushed       
        pi = null;
        System.gc();
   
        tx.begin();
        pi = (FieldsOfPrimitiveint) pm.getObjectById(oid, true);
        checkValues(oid, 0); // check if persistent fields have values set

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

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

    }
   
    /** */
    private void checkValues(Object oid, int startValue){
        int i, value;
        FieldsOfPrimitiveint pi = (FieldsOfPrimitiveint)
            pm.getObjectById(oid, true);
        int n = pi.getLength();
        for( i = 0, value = startValue; i < n; ++i, ++value){
            if( !FieldsOfPrimitiveint.isPersistent[i] ) continue;
            int val = pi.get(i);
            if( val != value ){
                fail(ASSERTION_FAILED,
                        "Incorrect value for " +
                        FieldsOfPrimitiveint.fieldSpecs[i] +
                        ", expected value " + startValue +
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.