Class UpSaleProductCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
org.broadleafcommerce.admin.server.service.handler.UpSaleProductCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler,org.springframework.core.Ordered
@Component("blUpSaleProductCustomPersistenceHandler")
public class UpSaleProductCustomPersistenceHandler
extends ClassCustomPersistenceHandlerAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogServiceprotected static final Stringprotected static final Stringprotected static final StringFields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDERFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected voidaddProductLink(StringBuilder productLinks, String productName) canHandleAdd(PersistencePackage persistencePackage) protected voidvalidateDuplicateChild(Entity entity, Product relatedProduct, Product product) protected voidvalidateRecursiveRelationship(Entity entity, Product relatedProduct, Product product) protected voidvalidateSelfLink(Entity entity, String relatedSaleProductId, String productId) protected voidvalidateUpSaleProduct(Entity entity) protected voidvalidateUpSaleProducts(Entity entity, Product product, Long id, StringBuilder productLinks) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
classIsAssignableFrom, classMatchesMethods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
canHandleFetch, canHandleInspect, canHandleRemove, canHandleUpdate, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, remove, update, willHandleSecurity
-
Field Details
-
PRODUCT_ID
- See Also:
-
RELATED_SALE_PRODUCT_ID
- See Also:
-
PRODUCTS_SEPARATOR
- See Also:
-
catalogService
-
-
Constructor Details
-
UpSaleProductCustomPersistenceHandler
public UpSaleProductCustomPersistenceHandler()
-
-
Method Details
-
canHandleAdd
- Specified by:
canHandleAddin interfaceCustomPersistenceHandler- Overrides:
canHandleAddin classCustomPersistenceHandlerAdapter
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
addin interfaceCustomPersistenceHandler- Overrides:
addin classCustomPersistenceHandlerAdapter- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
validateUpSaleProduct
- Throws:
ValidationException
-
validateSelfLink
protected void validateSelfLink(Entity entity, String relatedSaleProductId, String productId) throws ValidationException - Throws:
ValidationException
-
validateDuplicateChild
protected void validateDuplicateChild(Entity entity, Product relatedProduct, Product product) throws ValidationException - Throws:
ValidationException
-
validateRecursiveRelationship
protected void validateRecursiveRelationship(Entity entity, Product relatedProduct, Product product) throws ValidationException - Throws:
ValidationException
-
validateUpSaleProducts
protected void validateUpSaleProducts(Entity entity, Product product, Long id, StringBuilder productLinks) throws ValidationException - Throws:
ValidationException
-
addProductLink
-