Interface SkuInventoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D
-
- All Superinterfaces:
CustomizableSkuInventoryRepository<D>
,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:
JpaSkuInventoryRepository<D>
@NoRepositoryBean
public interface SkuInventoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizableSkuInventoryRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware
Repository for persisting and retrieving
SkuInventory
records. Note that a
SkuInventory
record is always associated with an InventoryLocation
. Note, also,
that there is no default delete method on this repository. Rather, you may delete (archive) the
associated InventoryLocation
or you may update / adjust the inventory so that its
quantities are zero.- Author:
- Kelly Tisdell (ktisdell)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByParentSkuInventoryId
(String parentSkuInventoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Determines if anySkuInventory
records exist with the givenSkuInventory.getParentSkuInventoryId()
.org.springframework.data.domain.Page<D>
findAllByInventoryLocationContextId
(String inventoryLocationId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Read all Sku Inventories for the specified inventory location id matching the given filters.org.springframework.data.domain.Page<D>
findAllBySkuNameContainingIgnoreCase
(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allSkuInventory
, filtered by name.default org.springframework.data.domain.Page<D>
findAllBySkuRefSkuNameContainingIgnoreCase
(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.findByParentSkuInventoryIdAndSerializationValue
(String parentSkuInventoryId, String serializationValue, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds a (unique)SkuInventory
record for a given parent sku inventory id and serialization value.org.springframework.data.domain.Page<D>
readByInventoryLocationContextIdOrderByContextIdAsc
(String inventoryLocationContextId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a paginated list ofSkuInventory
records for a givenInventoryLocation#getContextId()
Methods inherited from interface com.broadleafcommerce.inventory.repository.CustomizableSkuInventoryRepository
deleteAllByInventoryLocationId, findAll, findAllByContextId, findAvailableBySkuReferenceForQuantity, findAvailableBySkuReferenceForQuantity, findAvailableBySkuReferenceForQuantity, findByContextId, findByInventoryLocationAndSkuRefFieldValues, findByInventoryLocationAndSkuRefFieldValuesAndNotSerialized, findBySkuReferencesAndLocationId, isAvailableBySkuReferenceForQuantity, readAllByInventoryLocationId, readConsolidatedInventoryQuantities, readSummaryAvailability
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
-
readByInventoryLocationContextIdOrderByContextIdAsc
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readByInventoryLocationContextIdOrderByContextIdAsc(String inventoryLocationContextId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a paginated list ofSkuInventory
records for a givenInventoryLocation#getContextId()
- Parameters:
inventoryLocationContextId
-page
-contextInfo
-- Returns:
-
findAllBySkuNameContainingIgnoreCase
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllBySkuNameContainingIgnoreCase(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find allSkuInventory
, filtered by name.- Parameters:
name
- the SkuInventory name to filter bypage
- the requested page of results from the databasefilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.contextInfo
- context information- Returns:
- all
SkuInventory
, filtered by name
-
findByParentSkuInventoryIdAndSerializationValue
@Policy(operationTypes=READ) Optional<D> findByParentSkuInventoryIdAndSerializationValue(String parentSkuInventoryId, String serializationValue, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds a (unique)SkuInventory
record for a given parent sku inventory id and serialization value.- Parameters:
parentSkuInventoryId
- the parent sku inventory idserializationValue
- the serialization valuecontext
- context information surrounding sandboxing and multitenant state- Returns:
- a (unique)
SkuInventory
record for a given parent sku inventory id and serialization value.
-
existsByParentSkuInventoryId
@Policy(operationTypes=READ) boolean existsByParentSkuInventoryId(String parentSkuInventoryId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Determines if anySkuInventory
records exist with the givenSkuInventory.getParentSkuInventoryId()
.- Parameters:
parentSkuInventoryId
- the parent sku inventory id to filter bycontext
- context information surrounding sandboxing and multitenant state- Returns:
- true if any
SkuInventory
records exist with the givenSkuInventory.getParentSkuInventoryId()
, otherwise false
-
findAllBySkuRefSkuNameContainingIgnoreCase
@Deprecated @Policy(operationTypes=READ) default org.springframework.data.domain.Page<D> findAllBySkuRefSkuNameContainingIgnoreCase(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Find allSkuInventory
, filtered by name.- Parameters:
name
- the SkuInventory name to filter bypage
- the requested page of results from the databasefilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.contextInfo
- context information- Returns:
- all
SkuInventory
, filtered by name
-
findAllByInventoryLocationContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByInventoryLocationContextId(String inventoryLocationId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Read all Sku Inventories for the specified inventory location id matching the given filters. Read all Inventory Locations,- Parameters:
inventoryLocationId
- the inventory location idfilters
- additional filters to apply in the query, can be nullpage
- the requested page of results from the databasecontext
- context information surrounding sandboxing and multitenant state- Returns:
- the Sku Inventories for the specified inventory location id
-
findAllBySkuNameContainingIgnoreCase(String, Node, Pageable, ContextInfo)