Examples of ReturnTypesMap2


Examples of org.apache.cayenne.testdo.testmap.ReturnTypesMap2

    }

    public void testVARBINARY() throws Exception {
        if (unitDbAdapter.supportsLobs()) {
            String columnName = "VARBINARY_COLUMN";
            ReturnTypesMap2 test = context.newObject(ReturnTypesMap2.class);
   
            byte[] varbinaryValue = {
                    3, 4, 5, -6, 7, 0, 2, 9, 45, 64, 3, 127, -128, -60
            };
            test.setVarbinaryColumn(varbinaryValue);
            context.commitChanges();
   
            NamedQuery q = new NamedQuery("SelectReturnTypesMap2");
            DataRow testRead = (DataRow) context.performQuery(q).get(0);
            Object columnValue = testRead.get(columnName);
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ReturnTypesMap2

        }
    }

    public void testVARBINARY2() throws Exception {
        if (unitDbAdapter.supportsLobs()) {
            ReturnTypesMap2 test = context.newObject(ReturnTypesMap2.class);
   
            byte[] varbinaryValue = {
                    3, 4, 5, -6, 7, 0, 2, 9, 45, 64, 3, 127, -128, -60
            };
            test.setVarbinaryColumn(varbinaryValue);
            context.commitChanges();
   
            SelectQuery q = new SelectQuery(ReturnTypesMap2.class);
            ReturnTypesMap2 testRead = (ReturnTypesMap2) context.performQuery(q).get(0);
            byte[] columnValue = testRead.getVarbinaryColumn();
            assertNotNull(columnValue);
            assertEquals(byte[].class, columnValue.getClass());
            assertTrue(Arrays.equals(varbinaryValue, columnValue));
        }
    }
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.