public TransactionDetailModel(final Connection objConnection, final Transaction objTransaction) { setConnection(objConnection); setEvent(objTransaction.getEvent()); setId(objTransaction.getId()); setPurchase(objTransaction.getPurchase()); setQuantity(objTransaction.getQuantity()); setSeason(objTransaction.getEvent().getSeason()); setTicketType(objTransaction.getType()); }
public Transaction toTransaction() { Transaction objTransaction = new Transaction(); objTransaction.setEvent(getEvent()); objTransaction.setId(getId()); objTransaction.setPurchase(getPurchase()); objTransaction.setQuantity(getQuantity()); objTransaction.setType(getTicketType()); return (objTransaction); }