Interface DistinctInventoryItemDao

All Known Implementing Classes:
MongoDistinctInventoryItemDao

public interface DistinctInventoryItemDao
Distinct inventory item Dao.
  • Method Details

    • createDistinctInventoryItem

      DistinctInventoryItem createDistinctInventoryItem(DistinctInventoryItem distinctInventoryItem)
      Creates a distinct inventory item.
      Parameters:
      distinctInventoryItem - the distinct inventory item.
      Returns:
      a distinct inventory item
    • getDistinctInventoryItem

      DistinctInventoryItem getDistinctInventoryItem(String id)
      Creates a distinct inventory item.
      Parameters:
      id - the distinct inventory item.
      Returns:
      a distinct inventory item
    • getDistinctInventoryItems

      Pagination<DistinctInventoryItem> getDistinctInventoryItems(int offset, int count, String userId, String profileId, boolean publicOnly)
      Gets a listing distinct inventory items.
      Parameters:
      offset - the offset from the beginning of the dataset
      count - the number of items to return
      userId - checked id of user
      profileId - checked id of profile.
      publicOnly - mark inventory items that are referred to only this with publicVisible flag
      Returns:
      a Pagination<InventoryItem>
    • getDistinctInventoryItems

      Pagination<DistinctInventoryItem> getDistinctInventoryItems(int offset, int count, String userId, String profileId, boolean publicOnly, String queryString)
      Gets a listing distinct inventory items filtering by query string.
      Parameters:
      offset - the offset from the beginning of the dataset
      count - the number of items to return
      userId - checked id of user
      profileId - checked id of profile.
      publicOnly - mark inventory items that are referred to only this with publicVisible flag
      Returns:
      a Pagination<InventoryItem>
    • getTotalDistinctInventoryItems

      Long getTotalDistinctInventoryItems(String userId, String profileId, boolean publicOnly, String queryString)
      Gets a total number of items for provided userId or profileId
      Parameters:
      userId - checked id of user
      profileId - checked id of profile.
      publicOnly - mark inventory items that are referred to only this with publicVisible flag
      Returns:
      a number of items
    • countDistinctMetadataField

      Long countDistinctMetadataField(String profileId, String fieldName)
      Gets a total number of distinct values for provided metadata field name.
      Parameters:
      profileId - optional value to count items that belongs only to that profile
      fieldName - metadata field name
      Returns:
      a number of distinct values
    • updateDistinctInventoryItem

      DistinctInventoryItem updateDistinctInventoryItem(DistinctInventoryItem distinctInventoryItem)
      Updates a distinct inventory item.
      Parameters:
      distinctInventoryItem - the distinct inventory item
      Returns:
      the item, as written to the database
    • deleteDistinctInventoryItem

      void deleteDistinctInventoryItem(String inventoryItemId)
      Deletes a distinct inventory item.
      Parameters:
      inventoryItemId - the distinct inventory item
    • findDistinctInventoryItemForOwner

      Optional<DistinctInventoryItem> findDistinctInventoryItemForOwner(String itemId, String ownerId)
      Finds the distinct inventory item with the owner ID and owner ID. This can be used for an ownership check of the specified item.
      Parameters:
      itemId - the DistinctInventoryItem.getId()
      ownerId - the owner of the ID (either user or profile)
      Returns:
      the item