Class RentTransaction


public class RentTransaction
extends Transaction
Class used to store Rent Transaction
Version:
1.0
Author:
Looz
  • Constructor Details

    • RentTransaction

      public RentTransaction()
      Blank
    • RentTransaction

      public RentTransaction​(Staff staff, Member memberInvolved, Book bookInvolved, int rentDurationInDays, double cashFlow)
      Constructor used to create a new RentTransaction
      Parameters:
      staff - staff object
      memberInvolved - member object
      bookInvolved - book object
      rentDurationInDays - integer, you may set this to 0 if this field is not needed
      cashFlow - Double, you may set it to 0 if this field is not needed
    • RentTransaction

      public RentTransaction​(int id, String date, TransactionType type, Staff staff, Member memberInvolved, Book bookInvolved, double cashFlow, int rentDurationInDays)
      Constructor used to import from database
      DO NOT use it to create new RentTransaction
      Parameters:
      id - Transaction ID
      date - Transaction Date
      type - TransactionType Enumeration
      staff - staff object
      memberInvolved - member object
      bookInvolved - book object
      cashFlow - Double, you may set it to 0 if this field is not needed
      rentDurationInDays - you may set this to 0 if this field is not needed
  • Method Details

    • setRentDurationInDays

      public void setRentDurationInDays​(int rentDurationInDays)
      Parameters:
      rentDurationInDays - Default RentDuration is 0, use this to set rent duration in days(int)
    • getRentDurationInDays

      public int getRentDurationInDays()
      Returns:
      Rent Duration if any, will return 0 if this transaction doesn't have rentDuration