Search in sources :

Example 76 with TableHelper

use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.

the class CayenneDataObjectRelationshipsIT method setUp.

@Before
public void setUp() throws Exception {
    tArtist = new TableHelper(dbHelper, "ARTIST");
    tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
    tPainting = new TableHelper(dbHelper, "PAINTING");
    tPainting.setColumns("PAINTING_ID", "PAINTING_TITLE", "ARTIST_ID");
    tPaintingInfo = new TableHelper(dbHelper, "PAINTING_INFO");
    tPaintingInfo.setColumns("PAINTING_ID", "TEXT_REVIEW");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 77 with TableHelper

use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.

the class CayenneDataObjectSetToManyCollectionIT method setUp.

@Before
public void setUp() throws Exception {
    TableHelper tCollectionToMany = new TableHelper(dbHelper, "COLLECTION_TO_MANY");
    tCollectionToMany.setColumns("ID");
    TableHelper tCollectionToManyTarget = new TableHelper(dbHelper, "COLLECTION_TO_MANY_TARGET");
    tCollectionToManyTarget.setColumns("ID", "COLLECTION_TO_MANY_ID");
    // single data set for all tests
    tCollectionToMany.insert(1).insert(2);
    tCollectionToManyTarget.insert(1, 1).insert(2, 1).insert(3, 1).insert(4, 2);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 78 with TableHelper

use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.

the class CayenneDataObjectSetToManyMapIT method setUp.

@Before
public void setUp() throws Exception {
    tMapToMany = new TableHelper(dbHelper, "MAP_TO_MANY");
    tMapToMany.setColumns("ID");
    tMapToManyTarget = new TableHelper(dbHelper, "MAP_TO_MANY_TARGET");
    tMapToManyTarget.setColumns("ID", "MAP_TO_MANY_ID", "NAME");
    tIdMapToMany = new TableHelper(dbHelper, "ID_MAP_TO_MANY");
    tIdMapToMany.setColumns("ID");
    tIdMapToManyTarget = new TableHelper(dbHelper, "ID_MAP_TO_MANY_TARGET");
    tIdMapToManyTarget.setColumns("ID", "MAP_TO_MANY_ID");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 79 with TableHelper

use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.

the class CayenneIT method setUp.

@Before
public void setUp() throws Exception {
    tArtist = new TableHelper(dbHelper, "ARTIST");
    tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
    tPainting = new TableHelper(dbHelper, "PAINTING");
    tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 80 with TableHelper

use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.

the class OneWayRelationshipsIT method setUp.

@Before
public void setUp() throws Exception {
    t1Helper = new TableHelper(dbHelper, "oneway_table1");
    t1Helper.setColumns("ID");
    t2Helper = new TableHelper(dbHelper, "oneway_table2");
    t2Helper.setColumns("ID", "TABLE1_ID");
    t3Helper = new TableHelper(dbHelper, "oneway_table3");
    t3Helper.setColumns("ID");
    t4Helper = new TableHelper(dbHelper, "oneway_table4");
    t4Helper.setColumns("ID", "TABLE3_ID").setColumnTypes(Types.INTEGER, Types.INTEGER);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Aggregations

TableHelper (org.apache.cayenne.test.jdbc.TableHelper)158 Before (org.junit.Before)132 Test (org.junit.Test)18 SelectQuery (org.apache.cayenne.query.SelectQuery)6 HashMap (java.util.HashMap)5 DBHelper (org.apache.cayenne.test.jdbc.DBHelper)5 Date (java.util.Date)2 Ignore (org.junit.Ignore)2 BigDecimal (java.math.BigDecimal)1 HashSet (java.util.HashSet)1 MapQueryCache (org.apache.cayenne.cache.MapQueryCache)1 DefaultRuntimeProperties (org.apache.cayenne.configuration.DefaultRuntimeProperties)1 OracleAdapter (org.apache.cayenne.dba.oracle.OracleAdapter)1 DefaultEventManager (org.apache.cayenne.event.DefaultEventManager)1 EJBQLQuery (org.apache.cayenne.query.EJBQLQuery)1 SQLTemplate (org.apache.cayenne.query.SQLTemplate)1 PrimitivesTestEntity (org.apache.cayenne.testdo.primitive.PrimitivesTestEntity)1 After (org.junit.After)1