Search in sources :

Example 1 with ProductGroup

use of com.salesmanager.shop.model.catalog.product.group.ProductGroup in project shopizer by shopizer-ecommerce.

the class ProductItemsFacadeImpl method listProductGroups.

@Override
public List<ProductGroup> listProductGroups(MerchantStore store, Language language) {
    Validate.notNull(store, "MerchantStore cannot be null");
    List<ProductRelationship> relationships = productRelationshipService.getGroups(store);
    List<ProductGroup> groups = new ArrayList<ProductGroup>();
    for (ProductRelationship relationship : relationships) {
        ProductGroup g = new ProductGroup();
        g.setActive(relationship.isActive());
        g.setCode(relationship.getCode());
        g.setId(relationship.getId());
        groups.add(g);
    }
    return groups;
}
Also used : ProductGroup(com.salesmanager.shop.model.catalog.product.group.ProductGroup) ProductRelationship(com.salesmanager.core.model.catalog.product.relationship.ProductRelationship) ArrayList(java.util.ArrayList)

Aggregations

ProductRelationship (com.salesmanager.core.model.catalog.product.relationship.ProductRelationship)1 ProductGroup (com.salesmanager.shop.model.catalog.product.group.ProductGroup)1 ArrayList (java.util.ArrayList)1