Class DefaultCharacteristicService<P extends Characteristic>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.catalog.service.product.characteristic.DefaultCharacteristicService<P>
All Implemented Interfaces:
CharacteristicService<P>, com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>

public class DefaultCharacteristicService<P extends Characteristic> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements CharacteristicService<P>
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultCharacteristicService(CharacteristicRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CharacteristicValidator characteristicValidator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
     
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    protected CharacteristicRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
     
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    readAllByIdIn(@NonNull Iterable<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the characteristics with matching ids.
    org.springframework.data.domain.Page<P>
    readAllByNameLike(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Read all characteristics filtered by name.

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Constructor Details

    • DefaultCharacteristicService

      public DefaultCharacteristicService(CharacteristicRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CharacteristicValidator characteristicValidator)
  • Method Details

    • readAllByNameLike

      public org.springframework.data.domain.Page<P> readAllByNameLike(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CharacteristicService
      Read all characteristics filtered by name.
      Specified by:
      readAllByNameLike in interface CharacteristicService<P extends Characteristic>
      Parameters:
      name - The name to filter by
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      all business types filtered by name.
    • readAllByIdIn

      public List<P> readAllByIdIn(@NonNull @NonNull Iterable<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CharacteristicService
      Reads all of the characteristics with matching ids.
      Specified by:
      readAllByIdIn in interface CharacteristicService<P extends Characteristic>
      Parameters:
      ids - The ids to match
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      All of the characteristics with matching ids.
    • getRepositoryDomain

      @NonNull public String getRepositoryDomain()
      Specified by:
      getRepositoryDomain in interface CharacteristicService<P extends Characteristic>
    • delete

      public void delete(@NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      delete in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends Characteristic>
      Overrides:
      delete in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends Characteristic>
    • getRepository

      protected CharacteristicRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends Characteristic>
    • getParser

      protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getCharacteristicValidator

      protected CharacteristicValidator getCharacteristicValidator()