Examples of FieldsOfObject


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

        Transaction tx = pm.currentTransaction();
        int i, n;
        Object firstValue = new SimpleClass(1, "Hello");
        Object secondValue = new SimpleClass(333, "420");
        tx.begin();
        FieldsOfObject pi = new FieldsOfObject();
        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 = (FieldsOfObject) 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.FieldsOfObject

    }

    /** */
    private void checkValues(Object oid, Object startValue){
        int i;
        FieldsOfObject pi = (FieldsOfObject) pm.getObjectById(oid, true);
        int n = pi.getLength();
        StringBuffer buffer = new StringBuffer();
        for( i = 0; i < n; ++i){
            if( !FieldsOfObject.isPersistent[i] ) continue;
            Object val = pi.get(i);
            if (val == null) {
                buffer.append("Field ");
                buffer.append(FieldsOfObject.fieldSpecs[i]);
                buffer.append(" is null. Expected ");
                buffer.append(startValue.toString());
View Full Code Here

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

        Transaction tx = pm.currentTransaction();
        int i, n;
        Object firstValue = new SimpleClass(1, "Hello");
        Object secondValue = new SimpleClass(333, "420");
        tx.begin();
        FieldsOfObject pi = new FieldsOfObject();
        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 = (FieldsOfObject) 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.FieldsOfObject

    }

    /** */
    private void checkValues(Object oid, Object startValue){
        int i;
        FieldsOfObject pi = (FieldsOfObject) pm.getObjectById(oid, true);
        int n = pi.getLength();
        StringBuffer buffer = new StringBuffer();
        for( i = 0; i < n; ++i){
            if( !FieldsOfObject.isPersistent[i] ) continue;
            Object val = pi.get(i);
            if (val == null) {
                buffer.append("Field ");
                buffer.append(FieldsOfObject.fieldSpecs[i]);
                buffer.append(" is null. Expected ");
                buffer.append(startValue.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.