Package my.edu.tarc.dco.bookrentalpos
Class RentTransaction
java.lang.Object
my.edu.tarc.dco.bookrentalpos.Entity
my.edu.tarc.dco.bookrentalpos.Transaction
my.edu.tarc.dco.bookrentalpos.RentTransaction
public class RentTransaction extends Transaction
Class used to store Rent Transaction
- Version:
- 1.0
- Author:
- Looz
-
Constructor Summary
Constructors Constructor Description RentTransaction()BlankRentTransaction(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 RentTransactionRentTransaction(Staff staff, Member memberInvolved, Book bookInvolved, int rentDurationInDays, double cashFlow)Constructor used to create a new RentTransaction -
Method Summary
Modifier and Type Method Description intgetRentDurationInDays()voidsetRentDurationInDays(int rentDurationInDays)Methods inherited from class my.edu.tarc.dco.bookrentalpos.Transaction
getBookInvolved, getCashFlow, getMemberInvolved, getStaffHandled, getType, setBookInvovled, setCashFlow, setMemberInvolved, setStaffHandled, setTypeMethods inherited from class my.edu.tarc.dco.bookrentalpos.Entity
equals, getDateCreated, getId, getName, setDateCreated, setID, setName
-
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 objectmemberInvolved- member objectbookInvolved- book objectrentDurationInDays- integer, you may set this to 0 if this field is not neededcashFlow- 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 IDdate- Transaction Datetype- TransactionType Enumerationstaff- staff objectmemberInvolved- member objectbookInvolved- book objectcashFlow- Double, you may set it to 0 if this field is not neededrentDurationInDays- 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
-