use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class CDOCollectionRelationshipIT 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);
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class CDOMany2OneIT 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", "GALLERY_ID").setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.BIGINT, Types.INTEGER);
tGallery = new TableHelper(dbHelper, "GALLERY");
tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class CDOMapRelationshipIT 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");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class CDOOne2ManyIT 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", "GALLERY_ID");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class CacheInvalidationCase method startCayenne.
@Before
public void startCayenne() throws Exception {
this.runtime = configureCayenne().build();
DBHelper dbHelper = new DBHelper(runtime.getDataSource());
this.e1 = new TableHelper(dbHelper, "E1").setColumns("ID");
this.e1.deleteAll();
this.e2 = new TableHelper(dbHelper, "E2").setColumns("ID");
this.e2.deleteAll();
}
Aggregations