Package dev.getelements.elements.sdk.dao
Interface DistinctInventoryItemDao
- All Known Implementing Classes:
MongoDistinctInventoryItemDao
public interface DistinctInventoryItemDao
Distinct inventory item Dao.
-
Method Summary
Modifier and TypeMethodDescriptioncountDistinctMetadataField
(String profileId, String fieldName) Gets a total number of distinct values for provided metadata field name.createDistinctInventoryItem
(DistinctInventoryItem distinctInventoryItem) Creates a distinct inventory item.void
deleteDistinctInventoryItem
(String inventoryItemId) Deletes a distinct inventory item.findDistinctInventoryItemForOwner
(String itemId, String ownerId) Finds the distinct inventory item with the owner ID and owner ID.Creates a distinct inventory item.getDistinctInventoryItems
(int offset, int count, String userId, String profileId, boolean publicOnly) Gets a listing distinct inventory items.getDistinctInventoryItems
(int offset, int count, String userId, String profileId, boolean publicOnly, String queryString) Gets a listing distinct inventory items filtering by query string.getTotalDistinctInventoryItems
(String userId, String profileId, boolean publicOnly, String queryString) Gets a total number of items for provided userId or profileIdupdateDistinctInventoryItem
(DistinctInventoryItem distinctInventoryItem) Updates a distinct inventory item.
-
Method Details
-
createDistinctInventoryItem
Creates a distinct inventory item.- Parameters:
distinctInventoryItem
- the distinct inventory item.- Returns:
- a distinct inventory item
-
getDistinctInventoryItem
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 datasetcount
- the number of items to returnuserId
- checked id of userprofileId
- 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 datasetcount
- the number of items to returnuserId
- checked id of userprofileId
- 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 userprofileId
- checked id of profile.publicOnly
- mark inventory items that are referred to only this with publicVisible flag- Returns:
- a number of items
-
countDistinctMetadataField
Gets a total number of distinct values for provided metadata field name.- Parameters:
profileId
- optional value to count items that belongs only to that profilefieldName
- metadata field name- Returns:
- a number of distinct values
-
updateDistinctInventoryItem
Updates a distinct inventory item.- Parameters:
distinctInventoryItem
- the distinct inventory item- Returns:
- the item, as written to the database
-
deleteDistinctInventoryItem
Deletes a distinct inventory item.- Parameters:
inventoryItemId
- the distinct inventory item
-
findDistinctInventoryItemForOwner
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
- theDistinctInventoryItem.getId()
ownerId
- the owner of the ID (either user or profile)- Returns:
- the item
-