Class MongoDistinctInventoryItemDao
java.lang.Object
dev.getelements.elements.dao.mongo.goods.MongoDistinctInventoryItemDao
- All Implemented Interfaces:
DistinctInventoryItemDao
-
Constructor Summary
Constructors -
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.voiddeleteDistinctInventoryItem(String inventoryItemId) Deletes a distinct inventory item.findDistinctInventoryItemForOwner(String id, String ownerId) Finds the distinct inventory item with the owner ID and owner ID.dev.morphia.DatastoreCreates 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 profileIdvoidsetBooleanQueryParser(BooleanQueryParser booleanQueryParser) voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapper(MapperRegistry mapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoItemDao(MongoItemDao mongoItemDao) voidsetMongoProfileDao(MongoProfileDao mongoProfileDao) voidsetMongoUserDao(MongoUserDao mongoUserDao) voidsetValidationHelper(ValidationHelper validationHelper) updateDistinctInventoryItem(DistinctInventoryItem distinctInventoryItem) Updates a distinct inventory item.
-
Constructor Details
-
MongoDistinctInventoryItemDao
public MongoDistinctInventoryItemDao()
-
-
Method Details
-
createDistinctInventoryItem
public DistinctInventoryItem createDistinctInventoryItem(DistinctInventoryItem distinctInventoryItem) Description copied from interface:DistinctInventoryItemDaoCreates a distinct inventory item.- Specified by:
createDistinctInventoryItemin interfaceDistinctInventoryItemDao- Parameters:
distinctInventoryItem- the distinct inventory item.- Returns:
- a distinct inventory item
-
getDistinctInventoryItem
Description copied from interface:DistinctInventoryItemDaoCreates a distinct inventory item.- Specified by:
getDistinctInventoryItemin interfaceDistinctInventoryItemDao- Parameters:
id- the distinct inventory item.- Returns:
- a distinct inventory item
-
getDistinctInventoryItems
public Pagination<DistinctInventoryItem> getDistinctInventoryItems(int offset, int count, String userId, String profileId, boolean publicOnly) Description copied from interface:DistinctInventoryItemDaoGets a listing distinct inventory items.- Specified by:
getDistinctInventoryItemsin interfaceDistinctInventoryItemDao- 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
public Pagination<DistinctInventoryItem> getDistinctInventoryItems(int offset, int count, String userId, String profileId, boolean publicOnly, String queryString) Description copied from interface:DistinctInventoryItemDaoGets a listing distinct inventory items filtering by query string.- Specified by:
getDistinctInventoryItemsin interfaceDistinctInventoryItemDao- 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
public Long getTotalDistinctInventoryItems(String userId, String profileId, boolean publicOnly, String queryString) Description copied from interface:DistinctInventoryItemDaoGets a total number of items for provided userId or profileId- Specified by:
getTotalDistinctInventoryItemsin interfaceDistinctInventoryItemDao- 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
Description copied from interface:DistinctInventoryItemDaoGets a total number of distinct values for provided metadata field name.- Specified by:
countDistinctMetadataFieldin interfaceDistinctInventoryItemDao- Parameters:
profileId- optional value to count items that belongs only to that profilefieldName- metadata field name- Returns:
- a number of distinct values
-
updateDistinctInventoryItem
public DistinctInventoryItem updateDistinctInventoryItem(DistinctInventoryItem distinctInventoryItem) Description copied from interface:DistinctInventoryItemDaoUpdates a distinct inventory item.- Specified by:
updateDistinctInventoryItemin interfaceDistinctInventoryItemDao- Parameters:
distinctInventoryItem- the distinct inventory item- Returns:
- the item, as written to the database
-
deleteDistinctInventoryItem
Description copied from interface:DistinctInventoryItemDaoDeletes a distinct inventory item.- Specified by:
deleteDistinctInventoryItemin interfaceDistinctInventoryItemDao- Parameters:
inventoryItemId- the distinct inventory item
-
findDistinctInventoryItemForOwner
Description copied from interface:DistinctInventoryItemDaoFinds the distinct inventory item with the owner ID and owner ID. This can be used for an ownership check of the specified item.- Specified by:
findDistinctInventoryItemForOwnerin interfaceDistinctInventoryItemDao- Parameters:
id- theDistinctInventoryItem.getId()ownerId- the owner of the ID (either user or profile)- Returns:
- the item
-
getMapper
-
setMapper
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoItemDao
-
setMongoItemDao
-
getMongoUserDao
-
setMongoUserDao
-
getMongoProfileDao
-
setMongoProfileDao
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getBooleanQueryParser
-
setBooleanQueryParser
-