use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class JDOSQLQueryTest method entityProjections.
@Test
public void entityProjections() {
List<Product> products = sql().from(product).select(Projections.constructor(Product.class, product.name, product.description, product.price, product.amount)).fetch();
assertEquals(30, products.size());
for (Product p : products) {
assertNotNull(p.getName());
assertNotNull(p.getDescription());
assertNotNull(p.getPrice());
assertNotNull(p.getAmount());
}
}
use of com.querydsl.jdo.test.domain.Product in project querydsl by querydsl.
the class OrderingTest 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 SubqueriesTest 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 JDOSQLQueryTest 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 FetchPlanTest 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);
}
Aggregations