@Component(value="blUpSaleProductCustomPersistenceHandler") public class UpSaleProductCustomPersistenceHandler extends ClassCustomPersistenceHandlerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService |
protected static String |
PRODUCT_ID |
protected static String |
PRODUCTS_SEPARATOR |
protected static String |
RELATED_SALE_PRODUCT_ID |
DEFAULT_ORDER| Constructor and Description |
|---|
UpSaleProductCustomPersistenceHandler() |
| Modifier and Type | Method and Description |
|---|---|
Entity |
add(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
protected void |
addProductLink(StringBuilder productLinks,
String productName) |
Boolean |
canHandleAdd(PersistencePackage persistencePackage) |
protected void |
validateDuplicateChild(Entity entity,
Product relatedProduct,
Product product) |
protected void |
validateRecursiveRelationship(Entity entity,
Product relatedProduct,
Product product) |
protected void |
validateSelfLink(Entity entity,
String relatedSaleProductId,
String productId) |
protected void |
validateUpSaleProduct(Entity entity) |
protected void |
validateUpSaleProducts(Entity entity,
Product product,
Long id,
StringBuilder productLinks) |
classIsAssignableFrom, classMatchescanHandleFetch, canHandleInspect, canHandleRemove, canHandleUpdate, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, remove, update, willHandleSecurityprotected static final String PRODUCT_ID
protected static final String RELATED_SALE_PRODUCT_ID
protected static final String PRODUCTS_SEPARATOR
protected CatalogService catalogService
public UpSaleProductCustomPersistenceHandler()
public Boolean canHandleAdd(PersistencePackage persistencePackage)
canHandleAdd in interface CustomPersistenceHandlercanHandleAdd in class CustomPersistenceHandlerAdapterpublic Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
add in interface CustomPersistenceHandleradd in class CustomPersistenceHandlerAdapterorg.broadleafcommerce.common.exception.ServiceExceptionprotected void validateUpSaleProduct(Entity entity) throws ValidationException
ValidationExceptionprotected void validateSelfLink(Entity entity, String relatedSaleProductId, String productId) throws ValidationException
ValidationExceptionprotected void validateDuplicateChild(Entity entity, Product relatedProduct, Product product) throws ValidationException
ValidationExceptionprotected void validateRecursiveRelationship(Entity entity, Product relatedProduct, Product product) throws ValidationException
ValidationExceptionprotected void validateUpSaleProducts(Entity entity, Product product, Long id, StringBuilder productLinks) throws ValidationException
ValidationExceptionprotected void addProductLink(StringBuilder productLinks, String productName)
Copyright © 2022. All rights reserved.