Search in sources :

Example 1 with TableHelper

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

the class NumericTypesIT method setUp.

@Before
public void setUp() throws Exception {
    tSmallintTest = new TableHelper(dbHelper, "SMALLINT_TEST");
    tSmallintTest.setColumns("ID", "SMALLINT_COL");
    tTinyintTest = new TableHelper(dbHelper, "TINYINT_TEST");
    tTinyintTest.setColumns("ID", "TINYINT_COL");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 2 with TableHelper

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

the class FlattenedServerCase method startCayenne.

@Before
public void startCayenne() throws Exception {
    this.runtime = configureCayenne().build();
    DBHelper dbHelper = new DBHelper(runtime.getDataSource());
    this.e3 = new TableHelper(dbHelper, "E3").setColumns("ID");
    this.e4 = new TableHelper(dbHelper, "E4").setColumns("ID");
    this.e34 = new TableHelper(dbHelper, "E34").setColumns("E3_ID", "E4_ID");
    this.e34.deleteAll();
    this.e3.deleteAll();
}
Also used : DBHelper(org.apache.cayenne.test.jdbc.DBHelper) TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 3 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");
    createTestDataSet();
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 4 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 5 with TableHelper

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

the class Cay2641IT method setup.

@Before
public void setup() throws Exception {
    TableHelper th = new TableHelper(dbHelper, "ArtistLazy").setColumns("ID", "NAME", "SURNAME").setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.VARCHAR);
    th.insert(1, "artist1", "artist2");
    th = new TableHelper(dbHelper, "PaintingLazy").setColumns("ID", "NAME", "ARTIST_ID").setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.INTEGER);
    th.insert(1, "painting1", 1);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Aggregations

TableHelper (org.apache.cayenne.test.jdbc.TableHelper)175 Before (org.junit.Before)147 Test (org.junit.Test)19 HashMap (java.util.HashMap)5 DBHelper (org.apache.cayenne.test.jdbc.DBHelper)5 Date (java.util.Date)2 After (org.junit.After)2 BigDecimal (java.math.BigDecimal)1 HashSet (java.util.HashSet)1 DataRow (org.apache.cayenne.DataRow)1 ObjectContext (org.apache.cayenne.ObjectContext)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 Expression (org.apache.cayenne.exp.Expression)1 EJBQLQuery (org.apache.cayenne.query.EJBQLQuery)1 SQLTemplate (org.apache.cayenne.query.SQLTemplate)1 CAY2666 (org.apache.cayenne.testdo.cay_2666.CAY2666)1 PrimitivesTestEntity (org.apache.cayenne.testdo.primitive.PrimitivesTestEntity)1