Package org.apache.cayenne.test.jdbc

Examples of org.apache.cayenne.test.jdbc.TableHelper


    @Override
    protected void setUpAfterInjection() throws Exception {
        dbHelper.deleteAll("MT_TABLE2");
        dbHelper.deleteAll("MT_TABLE1");

        tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
        tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");

        tMtTable2 = new TableHelper(dbHelper, "MT_TABLE2");
        tMtTable2.setColumns("TABLE2_ID", "TABLE1_ID", "GLOBAL_ATTRIBUTE");

        tMtMeaningfulPK = new TableHelper(dbHelper, "MT_MEANINGFUL_PK");
        tMtMeaningfulPK.setColumns("PK");
    }
View Full Code Here


        dbHelper.deleteAll("ARTIST_GROUP");
        dbHelper.deleteAll("ARTIST");
        dbHelper.deleteAll("COMPOUND_PK_TEST");
        dbHelper.deleteAll("CHAR_PK_TEST");

        tArtist = new TableHelper(dbHelper, "ARTIST");
        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");

        tPainting = new TableHelper(dbHelper, "PAINTING");
        tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE");

        tCompoundPKTest = new TableHelper(dbHelper, "COMPOUND_PK_TEST");
        tCompoundPKTest.setColumns("KEY1", "KEY2", "NAME");

        tCharPKTest = new TableHelper(dbHelper, "CHAR_PK_TEST");
        tCharPKTest.setColumns("PK_COL", "OTHER_COL");
    }
View Full Code Here

        dbHelper.deleteAll("PAINTING");
        dbHelper.deleteAll("ARTIST_EXHIBIT");
        dbHelper.deleteAll("ARTIST_GROUP");
        dbHelper.deleteAll("ARTIST");

        TableHelper tArtist = new TableHelper(dbHelper, "ARTIST");
        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
        tArtist.insert(33001, "AA1");
        tArtist.insert(33002, "AA2");
        tArtist.insert(33003, "BB1");
        tArtist.insert(33004, "BB2");

        TableHelper tPainting = new TableHelper(dbHelper, "PAINTING");
        tPainting.setColumns(
                "PAINTING_ID",
                "ARTIST_ID",
                "PAINTING_TITLE",
                "ESTIMATED_PRICE");
        tPainting.insert(33001, 33001, "P1", 3000);
        tPainting.insert(33002, 33002, "P2", 5000);
        tPainting.insert(33003, null, "P3", 5000);
    }
View Full Code Here

        dbHelper.deleteAll("PAINTING");
        dbHelper.deleteAll("ARTIST_EXHIBIT");
        dbHelper.deleteAll("ARTIST_GROUP");
        dbHelper.deleteAll("ARTIST");

        tPainting = new TableHelper(dbHelper, "PAINTING");
        tPainting.setColumns(
                "PAINTING_ID",
                "ARTIST_ID",
                "PAINTING_TITLE",
                "ESTIMATED_PRICE");

        tMeaningfulPKTest1Table = new TableHelper(dbHelper, "MEANINGFUL_PK_TEST1");
        tMeaningfulPKTest1Table.setColumns("PK_ATTRIBUTE", "DESCR");
    }
View Full Code Here

        dbHelper.deleteAll("TEST_QUALIFIED2");
        dbHelper.deleteAll("TEST_QUALIFIED1");

        int bool = accessStackAdapter.supportsBoolean() ? Types.BOOLEAN : Types.INTEGER;

        tQualified1 = new TableHelper(dbHelper, "TEST_QUALIFIED1");
        tQualified1.setColumns("ID", "NAME", "DELETED").setColumnTypes(
                Types.INTEGER,
                Types.VARCHAR,
                bool);

        tQualified2 = new TableHelper(dbHelper, "TEST_QUALIFIED2");
        tQualified2.setColumns("ID", "NAME", "DELETED", "QUALIFIED1_ID").setColumnTypes(
                Types.INTEGER,
                Types.VARCHAR,
                bool,
                Types.INTEGER);
View Full Code Here

        dbHelper.deleteAll("PAINTING");
        dbHelper.deleteAll("ARTIST_EXHIBIT");
        dbHelper.deleteAll("ARTIST_GROUP");
        dbHelper.deleteAll("ARTIST");

        tArtist = new TableHelper(dbHelper, "ARTIST");
        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");

        tPainting = new TableHelper(dbHelper, "PAINTING");
        tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE").setColumnTypes(Types.INTEGER, Types.BIGINT,
                Types.VARCHAR);
    }
View Full Code Here

        dbHelper.deleteAll("PAINTING");
        dbHelper.deleteAll("ARTIST_EXHIBIT");
        dbHelper.deleteAll("ARTIST_GROUP");
        dbHelper.deleteAll("ARTIST");

        tArtist = new TableHelper(dbHelper, "ARTIST");
        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");

        tPainting = new TableHelper(dbHelper, "PAINTING");
        tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE").setColumnTypes(Types.INTEGER, Types.BIGINT,
                Types.VARCHAR);

        tPaintingInfo = new TableHelper(dbHelper, "PAINTING_INFO");
        tPaintingInfo.setColumns("PAINTING_ID", "TEXT_REVIEW");
    }
View Full Code Here

    @Override
    protected void setUpAfterInjection() throws Exception {
        dbHelper.deleteAll("MT_TABLE1");

        tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
        tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
    }
View Full Code Here

        dbHelper.deleteAll("THING");
        dbHelper.deleteAll("BOX_INFO");
        dbHelper.deleteAll("BOX");
        dbHelper.deleteAll("BAG");

        tBoxThing = new TableHelper(dbHelper, "BOX_THING");
        tBoxThing.setColumns("BOX_ID", "THING_WEIGHT", "THING_VOLUME");
    }
View Full Code Here

        dbHelper.deleteAll("QUALIFIED2");
        dbHelper.deleteAll("QUALIFIED1");

        int bool = accessStackAdapter.supportsBoolean() ? Types.BOOLEAN : Types.INTEGER;

        tQualified1 = new TableHelper(dbHelper, "QUALIFIED1");
        tQualified1.setColumns("ID", "NAME", "DELETED").setColumnTypes(
                Types.INTEGER,
                Types.VARCHAR,
                bool);

        tQualified2 = new TableHelper(dbHelper, "QUALIFIED2");
        tQualified2.setColumns("ID", "NAME", "DELETED", "QUALIFIED1_ID").setColumnTypes(
                Types.INTEGER,
                Types.VARCHAR,
                bool,
                Types.INTEGER);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.test.jdbc.TableHelper

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.