public interface ProductDao<T extends Product> extends QueryableDao<T>
Product
related data modelModifier and Type | Field and Description |
---|---|
static String |
FILTER_PARENTS
Special Query Attribute:
Filter out parent nodes under this parent
|
static String |
FILTER_PARENTS_IMMEDIATE
Special Query Attribute:
If filterParents is true then this attribute is used to check if we want to filter for immediate
|
Modifier and Type | Method and Description |
---|---|
void |
convert(IHierarchialReference entity,
Class to)
If we wish to transform an entity type we should perform the transformation and then the update.
|
int |
countFilterParents(T parent,
boolean immediate)
Return number of nodes that are parents under the specified parent Node
The parent node must have a valid Product.getId() or HierarchialDomainObject.getHierarchy() ; immediate is false. |
Long |
delete(Collection<Long> ids) |
void |
deleteSubHierarchy(T rootNode) |
List<T> |
filterParents(T parent,
boolean immediate)
Return
List of nodes that are parents under the specified parent Node The parent node must have a valid Product.getId() or HierarchialDomainObject.getHierarchy() ; immediate is false. |
List<ProductAlias> |
getAliasForProduct(T product)
For a given Product (T) derive all its
ProductAlias |
String |
getLastChildHierarchyCode(T parent)
Get last childs hierarchy code
|
List<T> |
getParents(T product,
boolean includeThis,
String DEFAULT_PRODUCT_NAME,
QueryOptimizer queryOptimizer)
Get parents for the product.
|
boolean |
isExistsAsParent(T node) |
Page<T> |
loadPage(Query<T> query)
Load data in paginated fashion.
|
String |
makeSpaceForNodeInParent(T node,
T parent,
Integer sequence) |
void |
move(T product,
T newParent,
Integer order) |
ProductAlias |
save(ProductAlias alias)
Save a
ProductAlias |
ProductAttribute |
save(ProductAttribute attrib)
Ability to update a single
ProductAttribute without updating the whole Product
Useful in Ajax situations where we want to save a partial aspect of the product only. |
count, getEntityInstance, query, query, queryPage, queryPage
static final String FILTER_PARENTS
static final String FILTER_PARENTS_IMMEDIATE
Page<T> loadPage(Query<T> query)
query
- String getLastChildHierarchyCode(T parent)
parent
- Long delete(Collection<Long> ids)
List<T> filterParents(T parent, boolean immediate)
List
of nodes that are parents under the specified parent Node Product.getId()
or HierarchialDomainObject.getHierarchy()
; immediate is false.parent
- as Timmediate
- as boolean; if true will fetch only parents immediately under the specified parentint countFilterParents(T parent, boolean immediate)
Product.getId()
or HierarchialDomainObject.getHierarchy()
; immediate is false.parent
- as Timmediate
- as boolean; if true will fetch only parents immediately under the specified parentvoid convert(IHierarchialReference entity, Class to)
InheritanceType.SINGLE_TABLE
or oen where there is a shared DiscriminatorValue
ProductAttribute save(ProductAttribute attrib)
ProductAttribute
without updating the whole Product
attrib
- as ProductAttribute
ProductAttribute
ProductAlias save(ProductAlias alias)
ProductAlias
alias
- List<ProductAlias> getAliasForProduct(T product)
ProductAlias
product
- boolean isExistsAsParent(T node)
List<T> getParents(T product, boolean includeThis, String DEFAULT_PRODUCT_NAME, QueryOptimizer queryOptimizer)
product
- as productincludeThis
- DEFAULT_PRODUCT_NAME
- as String of the default product name. If empty, then its not included.queryOptimizer
- as QueryOptimizer
Copyright © 2018. All rights reserved.