Examples of ItestTableUtils


Examples of org.apache.cayenne.itest.ItestTableUtils

import org.apache.cayenne.jpa.itest.ch2.entity.SingleTableInheritanceSuper1;

public class _2_1_10_1_SingleTablePerClassTest extends EntityManagerCase {

    public void testSelectSuper() throws Exception {
        ItestTableUtils helper = getTableHelper("ST_INHERITANCE");
        helper.deleteAll();
        helper.setColumns("id", "objectType", "propertyA", "propertyB", "propertyC");
        helper.insert(1, "A", "1", null, null);
        helper.insert(2, "A", "2", null, null);
        helper.insert(3, "B", "3", "BX", null);
        helper.insert(4, "C", "4", null, "CX");

        Query query = getEntityManager().createQuery(
                "select a FROM SingleTableInheritanceSuper1 a ORDER BY a.propertyA");
        List<?> results = query.getResultList();
        assertEquals(4, results.size());
View Full Code Here

Examples of org.apache.cayenne.itest.ItestTableUtils

                .getClass()
                .getName());
    }

    public void testSelectSub() throws Exception {
        ItestTableUtils helper = getTableHelper("ST_INHERITANCE");
        helper.deleteAll();
        helper.setColumns("id", "objectType", "propertyA", "propertyB", "propertyC");
        helper.insert(1, "A", "1", null, null);
        helper.insert(2, "A", "2", null, null);
        helper.insert(3, "B", "3", "BX", null);
        helper.insert(4, "C", "4", null, "CX");

        Query query = getEntityManager().createQuery(
                "select a FROM SingleTableInheritanceSub1 a ORDER BY a.propertyA");
        List<?> results = query.getResultList();
        assertEquals(1, results.size());
View Full Code Here

Examples of org.apache.cayenne.itest.ItestTableUtils

    protected ItestDBUtils getDbHelper() {
        return ItestSetup.getInstance().getDbHelper();
    }
   
    protected ItestTableUtils getTableHelper(String tableName) {
        return new ItestTableUtils(getDbHelper(), tableName);
    }
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.