Class CrossSaleProductCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
org.broadleafcommerce.admin.server.service.handler.CrossSaleProductCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler,org.springframework.core.Ordered
@Component("blCrossSaleProductCustomPersistenceHandler")
public class CrossSaleProductCustomPersistenceHandler
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 voidvalidateCrossSaleProduct(Entity entity) protected voidvalidateCrossSaleProducts(Entity entity, Product product, Long id, StringBuilder productLinks) protected voidvalidateDuplicateChild(Entity entity, Product relatedProduct, Product product) protected voidvalidateRecursiveRelationship(Entity entity, Product relatedProduct, Product product) protected voidvalidateSelfLink(Entity entity, String relatedSaleProductId, String productId) 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
-
CrossSaleProductCustomPersistenceHandler
public CrossSaleProductCustomPersistenceHandler()
-
-
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
-
validateCrossSaleProduct
- 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
-
validateCrossSaleProducts
protected void validateCrossSaleProducts(Entity entity, Product product, Long id, StringBuilder productLinks) throws ValidationException - Throws:
ValidationException
-
addProductLink
-