org.broadleafcommerce.admin.server.service.handler
Class SkuRestrictionFactoryImpl

java.lang.Object
  extended by org.broadleafcommerce.admin.server.service.handler.SkuRestrictionFactoryImpl
All Implemented Interfaces:
RestrictionFactory

@Component(value="blSkuRestrictionFactory")
public class SkuRestrictionFactoryImpl
extends Object
implements RestrictionFactory

This class takes into account that filters should be applied on either the root Sku property itself OR the defaultSku for this particular Sku.

Author:
Jeff Fischer

Field Summary
protected static String DEFAULT_SKU_PATH_PREFIX
           
protected  RestrictionFactory delegate
           
protected  String skuPropertyPrefix
           
 
Constructor Summary
SkuRestrictionFactoryImpl()
           
 
Method Summary
protected  javax.persistence.criteria.Predicate buildCompositePredicate(javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.Path targetPropertyPath, javax.persistence.criteria.Path productPath, javax.persistence.criteria.Predicate propertyExpression, javax.persistence.criteria.Predicate defaultSkuExpression)
           
 RestrictionFactory getDelegate()
           
 Restriction getRestriction(String type, String propertyId)
           
 String getSkuPropertyPrefix()
           
 void setDelegate(RestrictionFactory delegate)
           
 void setSkuPropertyPrefix(String skuPropertyPrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected RestrictionFactory delegate

DEFAULT_SKU_PATH_PREFIX

protected static final String DEFAULT_SKU_PATH_PREFIX
See Also:
Constant Field Values

skuPropertyPrefix

protected String skuPropertyPrefix
Constructor Detail

SkuRestrictionFactoryImpl

public SkuRestrictionFactoryImpl()
Method Detail

getRestriction

public Restriction getRestriction(String type,
                                  String propertyId)
Specified by:
getRestriction in interface RestrictionFactory

buildCompositePredicate

protected javax.persistence.criteria.Predicate buildCompositePredicate(javax.persistence.criteria.CriteriaBuilder builder,
                                                                       javax.persistence.criteria.Path targetPropertyPath,
                                                                       javax.persistence.criteria.Path productPath,
                                                                       javax.persistence.criteria.Predicate propertyExpression,
                                                                       javax.persistence.criteria.Predicate defaultSkuExpression)

getDelegate

public RestrictionFactory getDelegate()

setDelegate

public void setDelegate(RestrictionFactory delegate)

getSkuPropertyPrefix

public String getSkuPropertyPrefix()

setSkuPropertyPrefix

public void setSkuPropertyPrefix(String skuPropertyPrefix)


Copyright © 2013. All Rights Reserved.