Search in sources :

Example 46 with TableHelper

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

the class SelectQueryClobIT method createClobDataSet.

protected void createClobDataSet() throws Exception {
    TableHelper tClobTest = new TableHelper(dbHelper, "CLOB_TEST");
    tClobTest.setColumns("CLOB_TEST_ID", "CLOB_COL");
    tClobTest.deleteAll();
    tClobTest.insert(1, "clob1");
    tClobTest.insert(2, "clob2");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper)

Example 47 with TableHelper

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

the class SelectQueryIT method before.

@Before
public void before() {
    this.tArtist = new TableHelper(dbHelper, "ARTIST").setColumns("ARTIST_ID", "ARTIST_NAME", "DATE_OF_BIRTH").setColumnTypes(Types.BIGINT, Types.CHAR, Types.DATE);
    tPainting = new TableHelper(dbHelper, "PAINTING").setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE").setColumnTypes(Types.INTEGER, Types.BIGINT, Types.VARCHAR);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 48 with TableHelper

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

the class SelectQueryReturnTypesIT method createNumericsDataSet.

protected void createNumericsDataSet() throws Exception {
    TableHelper tNumerics = new TableHelper(dbHelper, "TYPES_MAPPING_TEST1");
    tNumerics.setColumns("AAAID", "INTEGER_COLUMN");
    tNumerics.insert(1, 0);
    tNumerics.insert(2, 1);
    tNumerics.insert(3, 2);
    tNumerics.insert(4, 3);
    tNumerics.insert(5, 4);
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper)

Example 49 with TableHelper

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

the class MixedPersistenceStrategyIT method setUp.

@Before
public void setUp() throws Exception {
    tMixedPersistenceStrategy = new TableHelper(dbHelper, "MIXED_PERSISTENCE_STRATEGY");
    tMixedPersistenceStrategy.setColumns("ID", "DESCRIPTION", "NAME");
    tMixedPersistenceStrategy2 = new TableHelper(dbHelper, "MIXED_PERSISTENCE_STRATEGY2");
    tMixedPersistenceStrategy2.setColumns("ID", "MASTER_ID", "NAME");
}
Also used : TableHelper(org.apache.cayenne.test.jdbc.TableHelper) Before(org.junit.Before)

Example 50 with TableHelper

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

the class ParsedExpQualifierCompatIT 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");
}
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