Search in sources :

Example 31 with TableHelper

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

the class RemoteIncrementalFaultListIT method setUp.

@Before
public void setUp() throws Exception {
    tMTTable = new TableHelper(dbHelper, "MT_TABLE1");
    tMTTable.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 32 with TableHelper

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

the class DataContextEJBQLDeleteIT method setUp.

@Before
public void setUp() throws Exception {
    tPainting = new TableHelper(dbHelper, "PAINTING");
    tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE", "ESTIMATED_PRICE").setColumnTypes(Types.INTEGER, Types.BIGINT, Types.VARCHAR, Types.DECIMAL);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 33 with TableHelper

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

the class DataContextIT method setUp.

@Before
public void setUp() throws Exception {
    tArtist = new TableHelper(dbHelper, "ARTIST");
    tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
    tExhibit = new TableHelper(dbHelper, "EXHIBIT");
    tExhibit.setColumns("EXHIBIT_ID", "GALLERY_ID", "OPENING_DATE", "CLOSING_DATE");
    tGallery = new TableHelper(dbHelper, "GALLERY");
    tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
    tPainting = new TableHelper(dbHelper, "PAINTING");
    tPainting.setColumns("PAINTING_ID", "PAINTING_TITLE", "ARTIST_ID", "ESTIMATED_PRICE");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 34 with TableHelper

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

the class DataContextDisjointByIdPrefetchIT 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").setColumnTypes(Types.INTEGER, Types.BIGINT, Types.VARCHAR);
    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 35 with TableHelper

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

the class DataContextEJBQLInheritanceIT method setUp.

@Before
public void setUp() throws Exception {
    TableHelper person = new TableHelper(dbHelper, "PERSON");
    person.setColumns("PERSON_ID", "NAME", "PERSON_TYPE", "SALARY").setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.CHAR, Types.FLOAT);
    person.insert(1, "a", "EE", 20000);
    person.insert(2, "b", "EE", 25000);
    person.insert(4, "c", "EM", 30000);
    person.insert(5, "d", "EM", 40000);
    person.insert(6, "e", "C", null);
}
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