Class MongoReceiptDao
java.lang.Object
dev.getelements.elements.dao.mongo.receipt.MongoReceiptDao
- All Implemented Interfaces:
ReceiptDao
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.dao.ReceiptDao
RECEIPT_CREATED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReceipt(Receipt receipt) Creates a new receipt.voiddeleteReceipt(String id) Deletes an existing receipt.dev.morphia.DatastoregetReceipt(String id) Gets the receipt with the matching database id, or throws aNotFoundExceptionif the receipt can't be found.getReceipt(String schema, String originalTransactionId) Gets the receipt with the matching schema and transaction id, or throws aNotFoundExceptionif the receipt can't be found.getReceipts(User user, int offset, int count) Gets receipts for a given user specifying the offset and the count.getReceipts(User user, int offset, int count, String search) Gets receipts for a given user specifying the offset and the count.voidsetDatastore(dev.morphia.Datastore datastore) voidsetDozerMapper(MapperRegistry dozerMapperRegistry) voidsetEventPublisher(Consumer<Event> eventPublisher) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoUserDao(MongoUserDao mongoUserDao) voidsetValidationHelper(ValidationHelper validationHelper)
-
Constructor Details
-
MongoReceiptDao
public MongoReceiptDao()
-
-
Method Details
-
getReceipts
Description copied from interface:ReceiptDaoGets receipts for a given user specifying the offset and the count.- Specified by:
getReceiptsin interfaceReceiptDao- Parameters:
user- the useroffset- the offsetcount- the countsearch- Used to filter by scheme if you support multiple IAP providers- Returns:
- a
PaginationofReceiptobjects.
-
getReceipts
Description copied from interface:ReceiptDaoGets receipts for a given user specifying the offset and the count.- Specified by:
getReceiptsin interfaceReceiptDao- Parameters:
user- the useroffset- the offsetcount- the count- Returns:
- a
PaginationofReceiptobjects.
-
getReceipt
Description copied from interface:ReceiptDaoGets the receipt with the matching database id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getReceiptin interfaceReceiptDao- Parameters:
id- the database id- Returns:
- the
Receiptthat was requested, never null
-
getReceipt
Description copied from interface:ReceiptDaoGets the receipt with the matching schema and transaction id, or throws aNotFoundExceptionif the receipt can't be found.- Specified by:
getReceiptin interfaceReceiptDao- Parameters:
originalTransactionId- the original transaction id- Returns:
- the
Receiptthat was requested, never null
-
createReceipt
Description copied from interface:ReceiptDaoCreates a new receipt.- Specified by:
createReceiptin interfaceReceiptDao- Returns:
- the
Receiptas it was written into the database
-
deleteReceipt
Description copied from interface:ReceiptDaoDeletes an existing receipt.- Specified by:
deleteReceiptin interfaceReceiptDao- Parameters:
id- the db id of the receipt
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getDozerMapper
-
setDozerMapper
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getMongoUserDao
-
setMongoUserDao
-
getEventPublisher
-
setEventPublisher
-