Interface ContentModelRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware, com.broadleafcommerce.common.messaging.notification.NotificationStateRepository, org.springframework.data.repository.Repository<D,String>, com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
All Known Subinterfaces:
JpaContentModelRepository<D>

@NoRepositoryBean public interface ContentModelRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable> extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
Repository for persistent counter-parts of ContentModel.
Author:
Jon Fleschler (jfleschler)
  • Method Summary

    Modifier and Type
    Method
    Description
    findAllByContextIdIn(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all the models with the given contextIds.
    org.springframework.data.domain.Page<D>
    findAllByNameContainingIgnoreCase(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find all content models, filtered by name.
    findByName(String contentTypeName, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find the content model with the given name.
    findByUri(String uri, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the model by the given uri.

    Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository

    findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository

    archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor

    exists, findAll, findAll, findAll, findAll
  • Method Details

    • findAllByNameContainingIgnoreCase

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCase(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all content models, filtered by name.
      Parameters:
      nameQuery - the content type name to filter by
      page - the requested page of results from the database
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      all content types, filtered by name
    • findByName

      @Policy(operationTypes=READ) Optional<D> findByName(String contentTypeName, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find the content model with the given name. There should only be one result, as content names are unique.
      Parameters:
      contentTypeName - the name of the content type to retrieve
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      an Optional containing the content that was found, empty otherwise
    • findAllByContextIdIn

      @Policy(operationTypes=READ) List<D> findAllByContextIdIn(@NonNull Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all the models with the given contextIds.
      Parameters:
      contextIds - ContextIds of the models to fetch
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      All the models with the given contextIds.
    • findByUri

      @Policy(operationTypes=READ) Optional<D> findByUri(String uri, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds the model by the given uri. uri cannot be null.
      Parameters:
      uri - URI of the model to fetch
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      The model by the given uri.