use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class GroupByTest method doPersist.
@BeforeClass
public static void doPersist() {
List<Object> entities = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
entities.add(new Product("C" + i, "F", 200.00, 2));
entities.add(new Product("B" + i, "E", 400.00, 4));
entities.add(new Product("A" + i, "D", 600.00, 6));
}
doPersist(entities);
}
use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class JDOQLMethodsTest method doPersist.
@BeforeClass
public static void doPersist() {
List<Object> entities = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
entities.add(new Product("C" + i, "F" + i, i * 200.00, 2));
entities.add(new Product("B" + i, "E" + i, i * 200.00, 4));
entities.add(new Product("A" + i, "D" + i, i * 200.00, 6));
}
doPersist(entities);
}
use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class JDOQueryStandardTest method standardTest.
@Test
public void standardTest() {
Product p = query().from(product).where(product.name.eq(productName)).limit(1).select(product).fetchOne();
Product p2 = query().from(product).where(product.name.startsWith(otherName)).limit(1).select(product).fetchOne();
standardTest.noProjections();
standardTest.noCounts();
standardTest.runBooleanTests(product.name.isNull(), otherProduct.price.lt(10.00));
standardTest.runCollectionTests(store.products, otherStore.products, p, p2);
standardTest.runDateTests(product.dateField, otherProduct.dateField, date);
standardTest.runDateTimeTests(product.publicationDate, otherProduct.publicationDate, publicationDate);
// NO list support in JDOQL
// testData.listTests(store.products, otherStore.products, p);
standardTest.runMapTests(store.productsByName, otherStore.productsByName, productName, p, "X", p2);
standardTest.runNumericCasts(product.price, otherProduct.price, 200.0);
standardTest.runNumericTests(product.amount, otherProduct.amount, 2);
standardTest.runStringTests(product.name, otherProduct.name, productName);
standardTest.runTimeTests(product.timeField, otherProduct.timeField, time);
standardTest.report();
}
use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class JDOQueryStandardTest method doPersist.
@BeforeClass
public static void doPersist() {
List<Object> entities = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
// Product instances
entities.add(new Product("ABC" + i, "F" + i, i * 200.00, 2, publicationDate));
entities.add(new Product("DEF" + i, "E" + i, i * 200.00, 4, publicationDate));
entities.add(new Product("GHI" + i, "D" + i, i * 200.00, 6, publicationDate));
// Product of Store
Product product = new Product(productName, "A", 100.0, 1, publicationDate);
entities.add(product);
// Store instances
Store store = new Store();
store.getProducts().add(product);
store.getProductsByName().put(productName, product);
entities.add(store);
}
doPersist(entities);
}
use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class AggregateTest method doPersist.
@BeforeClass
public static void doPersist() {
List<Product> entities = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
entities.add(new Product("C" + i, "F", 200.00, 2));
entities.add(new Product("B" + i, "E", 400.00, 4));
entities.add(new Product("A" + i, "D", 600.00, 6));
}
doPersist(entities);
}
Aggregations