Package org.apache.art

Examples of org.apache.art.ArraysEntity


    }

    public void testByteArray() {
        DataContext context = createDataContext();

        ArraysEntity test = context.newObject(ArraysEntity.class);

        byte[] a = new byte[] {
                1, 2, 3
        };
        test.setByteArray(a);
        context.commitChanges();

        SelectQuery q = new SelectQuery(ArraysEntity.class);
        ArraysEntity testRead = (ArraysEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getByteArray());
        assertArraysEqual(a, testRead.getByteArray());

        test.setByteArray(null);
        context.commitChanges();
    }
View Full Code Here


    }

    public void testCharArray() {
        DataContext context = createDataContext();

        ArraysEntity test = context.newObject(ArraysEntity.class);

        char[] a = new char[] {
                'x', 'y', 'z'
        };
        test.setCharArray(a);
        context.commitChanges();

        SelectQuery q = new SelectQuery(ArraysEntity.class);
        ArraysEntity testRead = (ArraysEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getCharArray());
        assertArraysEqual(a, testRead.getCharArray());

        test.setCharArray(null);
        context.commitChanges();
    }
View Full Code Here

    }

    public void testCharacterArray() {
        DataContext context = createDataContext();

        ArraysEntity test = context.newObject(ArraysEntity.class);

        Character[] a = new Character[] {
                new Character('x'), new Character('y'), new Character('z')
        };
        test.setCharWrapperArray(a);
        context.commitChanges();

        SelectQuery q = new SelectQuery(ArraysEntity.class);
        ArraysEntity testRead = (ArraysEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getCharWrapperArray());
        assertArraysEqual(a, testRead.getCharWrapperArray());

        test.setCharWrapperArray(null);
        context.commitChanges();
    }
View Full Code Here

    }

    public void testByteWrapperArray() {
        DataContext context = createDataContext();

        ArraysEntity test = context.newObject(ArraysEntity.class);

        Byte[] a = new Byte[] {
                new Byte((byte) 1), new Byte((byte) 2), new Byte((byte) 3)
        };
        test.setByteWrapperArray(a);
        context.commitChanges();

        SelectQuery q = new SelectQuery(ArraysEntity.class);
        ArraysEntity testRead = (ArraysEntity) context.performQuery(q).get(0);
        assertNotNull(testRead.getByteWrapperArray());
        assertArraysEqual(a, testRead.getByteWrapperArray());

        test.setByteWrapperArray(null);
        context.commitChanges();
    }
View Full Code Here

TOP

Related Classes of org.apache.art.ArraysEntity

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.