use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class EJBQLQueryCountIT method before.
@Before
public void before() 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");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class EJBQLQueryIT 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");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class EJBQLQueryNumericIT method setUp.
@Before
public void setUp() throws Exception {
tBigIntegerEntity = new TableHelper(dbHelper, "BIGINTEGER_ENTITY");
tBigIntegerEntity.setColumns("ID", "BIG_INTEGER_FIELD");
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class MappedQueryIT method createArtistsDataSet.
protected void createArtistsDataSet() throws Exception {
TableHelper tArtist = new TableHelper(dbHelper, "ARTIST");
tArtist.setColumns("ARTIST_ID", "ARTIST_NAME", "DATE_OF_BIRTH");
long dateBase = System.currentTimeMillis();
for (int i = 1; i <= 20; i++) {
tArtist.insert(i, "artist" + i, new java.sql.Date(dateBase + 10000 * i));
}
}
use of org.apache.cayenne.test.jdbc.TableHelper in project cayenne by apache.
the class ObjectSelect_AggregateIT method createArtistsDataSet.
@Before
public void createArtistsDataSet() throws Exception {
TableHelper tArtist = new TableHelper(dbHelper, "ARTIST");
tArtist.setColumns("ARTIST_ID", "ARTIST_NAME", "DATE_OF_BIRTH");
tArtist.setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.DATE);
java.sql.Date[] dates = new java.sql.Date[5];
for (int i = 1; i <= 5; i++) {
dates[i - 1] = new java.sql.Date(dateFormat.parse("1/" + i + "/17").getTime());
}
for (int i = 1; i <= 20; i++) {
tArtist.insert(i, "artist" + i, dates[i % 5]);
}
TableHelper tGallery = new TableHelper(dbHelper, "GALLERY");
tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
tGallery.insert(1, "tate modern");
TableHelper tPaintings = new TableHelper(dbHelper, "PAINTING");
tPaintings.setColumns("PAINTING_ID", "PAINTING_TITLE", "ARTIST_ID", "GALLERY_ID");
for (int i = 1; i <= 20; i++) {
tPaintings.insert(i, "painting" + i, i % 5 + 1, 1);
}
tPaintings.insert(21, "painting21", 2, 1);
}
Aggregations