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:
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler, org.springframework.core.Ordered

@Component("blCrossSaleProductCustomPersistenceHandler") public class CrossSaleProductCustomPersistenceHandler extends org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.core.catalog.service.CatalogService
     
    protected static final String
     
    protected static final String
     
    protected static final String
     

    Fields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler

    DEFAULT_ORDER

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.openadmin.dto.Entity
    add(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage, org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao dynamicEntityDao, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper)
     
    protected void
    addProductLink(StringBuilder productLinks, String productName)
     
    canHandleAdd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage)
     
    protected void
    validateCrossSaleProduct(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected void
    validateCrossSaleProducts(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product product, Long id, StringBuilder productLinks)
     
    protected void
    validateDuplicateChild(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product relatedProduct, org.broadleafcommerce.core.catalog.domain.Product product)
     
    protected void
    validateRecursiveRelationship(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product relatedProduct, org.broadleafcommerce.core.catalog.domain.Product product)
     
    protected void
    validateSelfLink(org.broadleafcommerce.openadmin.dto.Entity entity, String relatedSaleProductId, String productId)
     

    Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter

    classIsAssignableFrom, classMatches

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • CrossSaleProductCustomPersistenceHandler

      public CrossSaleProductCustomPersistenceHandler()
  • Method Details

    • canHandleAdd

      public Boolean canHandleAdd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage)
      Specified by:
      canHandleAdd in interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
      Overrides:
      canHandleAdd in class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
    • add

      public org.broadleafcommerce.openadmin.dto.Entity add(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage, org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao dynamicEntityDao, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Specified by:
      add in interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
      Overrides:
      add in class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • validateCrossSaleProduct

      protected void validateCrossSaleProduct(org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateSelfLink

      protected void validateSelfLink(org.broadleafcommerce.openadmin.dto.Entity entity, String relatedSaleProductId, String productId) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateDuplicateChild

      protected void validateDuplicateChild(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product relatedProduct, org.broadleafcommerce.core.catalog.domain.Product product) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateRecursiveRelationship

      protected void validateRecursiveRelationship(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product relatedProduct, org.broadleafcommerce.core.catalog.domain.Product product) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateCrossSaleProducts

      protected void validateCrossSaleProducts(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Product product, Long id, StringBuilder productLinks) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • addProductLink

      protected void addProductLink(StringBuilder productLinks, String productName)