Search in sources :

Example 66 with TableHelper

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

the class DataContextPrefetchIT 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", "ESTIMATED_PRICE", "GALLERY_ID").setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.BIGINT, Types.DECIMAL, Types.INTEGER);
    tPaintingInfo = new TableHelper(dbHelper, "PAINTING_INFO");
    tPaintingInfo.setColumns("PAINTING_ID", "TEXT_REVIEW");
    tExhibit = new TableHelper(dbHelper, "EXHIBIT");
    tExhibit.setColumns("EXHIBIT_ID", "GALLERY_ID", "OPENING_DATE", "CLOSING_DATE");
    tArtistExhibit = new TableHelper(dbHelper, "ARTIST_EXHIBIT");
    tArtistExhibit.setColumns("ARTIST_ID", "EXHIBIT_ID");
    tGallery = new TableHelper(dbHelper, "GALLERY");
    tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
    tArtistGroup = new TableHelper(dbHelper, "ARTIST_GROUP");
    tArtistGroup.setColumns("ARTIST_ID", "GROUP_ID");
    tArtGroup = new TableHelper(dbHelper, "ARTGROUP");
    tArtGroup.setColumns("GROUP_ID", "NAME");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 67 with TableHelper

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

the class DataContextPrefetchMultistepIT 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");
    tArtistExhibit = new TableHelper(dbHelper, "ARTIST_EXHIBIT");
    tArtistExhibit.setColumns("ARTIST_ID", "EXHIBIT_ID");
    tGallery = new TableHelper(dbHelper, "GALLERY");
    tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 68 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 69 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 70 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)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