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

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.cto.FilterCriterionProviders
      extended by org.broadleafcommerce.admin.server.service.handler.SkuPropertiesFilterCriterionProvider

public class SkuPropertiesFilterCriterionProvider
extends FilterCriterionProviders

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:
Phillip Verheyden (phillipuniverse)

Field Summary
protected static String DEFAULT_SKU_PATH_PREFIX
           
protected  String skuPropertyPrefix
           
 
Fields inherited from class org.broadleafcommerce.openadmin.server.cto.FilterCriterionProviders
BETWEEN, BETWEEN_DATE, COLLECTION_SIZE_EQ, EQ, ISNULL, LE, LIKE
 
Constructor Summary
SkuPropertiesFilterCriterionProvider()
           
SkuPropertiesFilterCriterionProvider(String skuPropertyPrefix)
          This should be used if you are attempting to filter on an object that could contain a Sku 'ToOne' relationship that might need to be filtered on.
 
Method Summary
protected  org.hibernate.criterion.Criterion buildCriterion(String targetPropertyName, org.hibernate.criterion.Criterion propertyCriterion, org.hibernate.criterion.Criterion defaultSkuCriterion)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getBetweenDateProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getBetweenProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getCollectionSizeEqualsProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getEqProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getIsNullProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getLessThanOrEqualProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 com.anasoft.os.daofusion.criteria.FilterCriterionProvider getLikeProvider(com.anasoft.os.daofusion.criteria.AssociationPath path, String propertyId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SKU_PATH_PREFIX

protected static final String DEFAULT_SKU_PATH_PREFIX
See Also:
Constant Field Values

skuPropertyPrefix

protected String skuPropertyPrefix
Constructor Detail

SkuPropertiesFilterCriterionProvider

public SkuPropertiesFilterCriterionProvider()

SkuPropertiesFilterCriterionProvider

public SkuPropertiesFilterCriterionProvider(String skuPropertyPrefix)
This should be used if you are attempting to filter on an object that could contain a Sku 'ToOne' relationship that might need to be filtered on. For instance, InventoryImpl has a 'Sku' property called 'sku'. In this scenario, the skuPropertyPrefix would be 'sku'.

Parameters:
skuPropertyPrefix -
Method Detail

getLikeProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getLikeProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                 String propertyId)
Overrides:
getLikeProvider in class FilterCriterionProviders

getEqProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getEqProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                               String propertyId)
Overrides:
getEqProvider in class FilterCriterionProviders

getIsNullProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getIsNullProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                   String propertyId)
Overrides:
getIsNullProvider in class FilterCriterionProviders

getLessThanOrEqualProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getLessThanOrEqualProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                            String propertyId)
Overrides:
getLessThanOrEqualProvider in class FilterCriterionProviders

getBetweenProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getBetweenProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                    String propertyId)
Overrides:
getBetweenProvider in class FilterCriterionProviders

getBetweenDateProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getBetweenDateProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                        String propertyId)
Overrides:
getBetweenDateProvider in class FilterCriterionProviders

getCollectionSizeEqualsProvider

public com.anasoft.os.daofusion.criteria.FilterCriterionProvider getCollectionSizeEqualsProvider(com.anasoft.os.daofusion.criteria.AssociationPath path,
                                                                                                 String propertyId)
Overrides:
getCollectionSizeEqualsProvider in class FilterCriterionProviders

buildCriterion

protected org.hibernate.criterion.Criterion buildCriterion(String targetPropertyName,
                                                           org.hibernate.criterion.Criterion propertyCriterion,
                                                           org.hibernate.criterion.Criterion defaultSkuCriterion)
Parameters:
targetPropertyName -
propertyCriterion -
defaultSkuCriterion -
Returns:


Copyright © 2013. All Rights Reserved.