Search in sources :

Example 1 with Store

use of com.querydsl.jdo.test.domain.Store 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);
}
Also used : QProduct(com.querydsl.jdo.test.domain.QProduct) Product(com.querydsl.jdo.test.domain.Product) QStore(com.querydsl.jdo.test.domain.QStore) Store(com.querydsl.jdo.test.domain.Store) BeforeClass(org.junit.BeforeClass)

Aggregations

Product (com.querydsl.jdo.test.domain.Product)1 QProduct (com.querydsl.jdo.test.domain.QProduct)1 QStore (com.querydsl.jdo.test.domain.QStore)1 Store (com.querydsl.jdo.test.domain.Store)1 BeforeClass (org.junit.BeforeClass)1