Class MongoReceiptDao

java.lang.Object
dev.getelements.elements.dao.mongo.receipt.MongoReceiptDao
All Implemented Interfaces:
ReceiptDao

public class MongoReceiptDao extends Object implements ReceiptDao
  • Constructor Details

    • MongoReceiptDao

      public MongoReceiptDao()
  • Method Details

    • getReceipts

      public Pagination<Receipt> getReceipts(User user, int offset, int count, String search)
      Description copied from interface: ReceiptDao
      Gets receipts for a given user specifying the offset and the count.
      Specified by:
      getReceipts in interface ReceiptDao
      Parameters:
      user - the user
      offset - the offset
      count - the count
      search - Used to filter by scheme if you support multiple IAP providers
      Returns:
      a Pagination of Receipt objects.
    • getReceipts

      public Pagination<Receipt> getReceipts(User user, int offset, int count)
      Description copied from interface: ReceiptDao
      Gets receipts for a given user specifying the offset and the count.
      Specified by:
      getReceipts in interface ReceiptDao
      Parameters:
      user - the user
      offset - the offset
      count - the count
      Returns:
      a Pagination of Receipt objects.
    • getReceipt

      public Receipt getReceipt(String id)
      Description copied from interface: ReceiptDao
      Gets the receipt with the matching database id, or throws a NotFoundException if the receipt can't be found.
      Specified by:
      getReceipt in interface ReceiptDao
      Parameters:
      id - the database id
      Returns:
      the Receipt that was requested, never null
    • getReceipt

      public Receipt getReceipt(String schema, String originalTransactionId)
      Description copied from interface: ReceiptDao
      Gets the receipt with the matching schema and transaction id, or throws a NotFoundException if the receipt can't be found.
      Specified by:
      getReceipt in interface ReceiptDao
      Parameters:
      originalTransactionId - the original transaction id
      Returns:
      the Receipt that was requested, never null
    • createReceipt

      public Receipt createReceipt(Receipt receipt)
      Description copied from interface: ReceiptDao
      Creates a new receipt.
      Specified by:
      createReceipt in interface ReceiptDao
      Returns:
      the Receipt as it was written into the database
    • deleteReceipt

      public void deleteReceipt(String id)
      Description copied from interface: ReceiptDao
      Deletes an existing receipt.
      Specified by:
      deleteReceipt in interface ReceiptDao
      Parameters:
      id - the db id of the receipt
    • getDatastore

      public dev.morphia.Datastore getDatastore()
    • setDatastore

      @Inject public void setDatastore(dev.morphia.Datastore datastore)
    • getDozerMapper

      public MapperRegistry getDozerMapper()
    • setDozerMapper

      @Inject public void setDozerMapper(MapperRegistry dozerMapperRegistry)
    • getValidationHelper

      public ValidationHelper getValidationHelper()
    • setValidationHelper

      @Inject public void setValidationHelper(ValidationHelper validationHelper)
    • getMongoDBUtils

      public MongoDBUtils getMongoDBUtils()
    • setMongoDBUtils

      @Inject public void setMongoDBUtils(MongoDBUtils mongoDBUtils)
    • getMongoUserDao

      public MongoUserDao getMongoUserDao()
    • setMongoUserDao

      @Inject public void setMongoUserDao(MongoUserDao mongoUserDao)
    • getEventPublisher

      public Consumer<Event> getEventPublisher()
    • setEventPublisher

      @Inject public void setEventPublisher(Consumer<Event> eventPublisher)