Interface QueryExtensionHandler
- All Superinterfaces:
ExtensionHandler
Extension handler (generally for DAO usage) that allows contribution to a query (presumably from another module).
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionPerform any breakdown operations.refineOrder
(Class<?> type, String[] config, jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery criteria, jakarta.persistence.criteria.Root root, List<jakarta.persistence.criteria.Order> sorts) Add sorting to the fetch queryrefineResults
(Class<?> type, String[] config, List queryResults, ExtensionResultHolder<List> response) Filter the results from the database in JavarefineRetrieve
(Class<?> type, String[] config, jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery criteria, jakarta.persistence.criteria.Root root, List<jakarta.persistence.criteria.Predicate> restrictions) Add additional restrictions to the fetch queryPerform any setup operations.Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Method Details
-
setup
Perform any setup operations. This is usually done before executing the query and can serve to prepare the BroadleafRequestContext (if applicable).- Parameters:
type
- the class type for the query (can be null)config
- pass information to the handler, perhaps to be used by the handler to determine suitability (can be null)- Returns:
- the status of the extension operation
-
refineRetrieve
ExtensionResultStatusType refineRetrieve(Class<?> type, String[] config, jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery criteria, jakarta.persistence.criteria.Root root, List<jakarta.persistence.criteria.Predicate> restrictions) Add additional restrictions to the fetch query- Parameters:
type
- the class type for the query (can be null)config
- pass information to the handler, perhaps to be used by the handler to determine suitability (can be null)builder
-criteria
-root
-restrictions
- any additional JPA criteria restrictions should be added here- Returns:
- the status of the extension operation
-
refineOrder
ExtensionResultStatusType refineOrder(Class<?> type, String[] config, jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery criteria, jakarta.persistence.criteria.Root root, List<jakarta.persistence.criteria.Order> sorts) Add sorting to the fetch query- Parameters:
type
- the class type for the query (can be null)config
- pass information to the handler, perhaps to be used by the handler to determine suitability (can be null)builder
-criteria
-root
-sorts
- any additional JPA order expressions should be added here- Returns:
- the status of the extension operation
-
refineResults
ExtensionResultStatusType refineResults(Class<?> type, String[] config, List queryResults, ExtensionResultHolder<List> response) Filter the results from the database in Java- Parameters:
type
- the class type for the query (can be null)config
- pass information to the handler, perhaps to be used by the handler to determine suitability (can be null)queryResults
- the results of the fetch query from the databaseresponse
- the container for the filtered results- Returns:
- the status of the extension operation
-
breakdown
Perform any breakdown operations. This is usually done after executing the query and can serve to reset the BroadleafRequestContext (if applicable)- Parameters:
type
- the class type for the query (can be null)config
- pass information to the handler, perhaps to be used by the handler to determine suitability (can be null)- Returns:
- the status of the extension operation
-