assertEquals("E2", results.get(0).getName());
}
public void testPaginatedQueries() {
QueryChain insert = new QueryChain();
insert
.addQuery(new SQLTemplate(
AbstractPerson.class,
"INSERT INTO PERSON (PERSON_ID, NAME, PERSON_TYPE) VALUES (1, 'E1', 'EE')"));
insert
.addQuery(new SQLTemplate(
AbstractPerson.class,
"INSERT INTO PERSON (PERSON_ID, NAME, PERSON_TYPE) VALUES (2, 'E2', 'EM')"));
insert
.addQuery(new SQLTemplate(
AbstractPerson.class,
"INSERT INTO PERSON (PERSON_ID, NAME, PERSON_TYPE) VALUES (3, 'E3', 'EE')"));
insert
.addQuery(new SQLTemplate(
AbstractPerson.class,
"INSERT INTO PERSON (PERSON_ID, NAME, PERSON_TYPE) VALUES (4, 'E4', 'EM')"));
insert
.addQuery(new SQLTemplate(
AbstractPerson.class,
"INSERT INTO PERSON (PERSON_ID, NAME, PERSON_TYPE) VALUES (5, 'E5', 'EE')"));
createDataContext().performGenericQuery(insert);