*/
void setReceiptSequenceNumber (final Long receiptSequenceNumber);
+ /**
+ * Getter for receipt transaction number
+ * <p>
+ * @return Receipt transaction number
+ */
+ Long getReceiptTransactionNumber ();
+
+ /**
+ * Setter for receipt transaction number
+ * <p>
+ * @param receiptTransactionNumber Receipt transaction number
+ */
+ void setReceiptTransactionNumber (final Long receiptTransactionNumber);
+
@Override
boolean equals (final Object object);
import org.mxchange.jusercore.model.user.Users;
/**
- *
+ * Receipt POJO
+ * <p>
* @author Roland Häder<roland@mxchange.org>
*/
@Entity (name = "receipts")
@Column (name = "receipt_sequence_number")
private Long receiptSequenceNumber;
+ /**
+ * Receipt transaction number
+ */
+ @Column (name = "receipt_transaction_number")
+ private Long receiptTransactionNumber;
+
/**
* Which user this receipt belongs to
*/
StringUtils.compare(this.getReceiptBarCodeNumber(), billableReceipt.getReceiptBarCodeNumber()),
// ... sequence number
SafeNumberUtils.compare(this.getReceiptSequenceNumber(), billableReceipt.getReceiptSequenceNumber()),
+ // ... transaction number
+ SafeNumberUtils.compare(this.getReceiptTransactionNumber(), billableReceipt.getReceiptTransactionNumber()),
// ... payment type
this.getReceiptPaymentType().compareTo(billableReceipt.getReceiptPaymentType()),
// ... register number
return false;
} else if (!Objects.equals(this.getReceiptNumber(), receipt.getReceiptNumber())) {
return false;
+ } else if (!Objects.equals(this.getReceiptSequenceNumber(), receipt.getReceiptSequenceNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getReceiptTransactionNumber(), receipt.getReceiptTransactionNumber())) {
+ return false;
} else if (this.getReceiptPaymentType() != receipt.getReceiptPaymentType()) {
return false;
} else if (!Objects.equals(this.getReceiptBranchOffice(), receipt.getReceiptBranchOffice())) {
this.receiptSequenceNumber = receiptSequenceNumber;
}
+ @Override
+ public Long getReceiptTransactionNumber () {
+ return this.receiptTransactionNumber;
+ }
+
+ @Override
+ public void setReceiptTransactionNumber (final Long receiptTransactionNumber) {
+ this.receiptTransactionNumber = receiptTransactionNumber;
+ }
+
@Override
public User getReceiptUser () {
return this.receiptUser;
hash = 89 * hash + Objects.hashCode(this.getReceiptId());
hash = 89 * hash + Objects.hashCode(this.getReceiptNumber());
+ hash = 89 * hash + Objects.hashCode(this.getReceiptSequenceNumber());
+ hash = 89 * hash + Objects.hashCode(this.getReceiptTransactionNumber());
hash = 89 * hash + Objects.hashCode(this.getReceiptPaymentType());
hash = 89 * hash + Objects.hashCode(this.getReceiptBranchOffice());
hash = 89 * hash + Objects.hashCode(this.getReceiptUser());
if (!Objects.equals(this.getItemId(), receiptItem.getItemId())) {
return false;
+ } else if (!Objects.equals(this.getItemNumber(), receiptItem.getItemNumber())) {
+ return false;
} else if (!Objects.equals(this.getItemProduct(), receiptItem.getItemProduct())) {
return false;
} else if (!Objects.equals(this.getItemProductQuantity(), receiptItem.getItemProductQuantity())) {
return false;
} else if (!Objects.equals(this.getItemReceipt(), receiptItem.getItemReceipt())) {
return false;
+ } else if (!Objects.equals(this.getItemCouponNumber(), receiptItem.getItemCouponNumber())) {
+ return false;
}
return true;
int hash = 5;
hash = 53 * hash + Objects.hashCode(this.getItemId());
+ hash = 53 * hash + Objects.hashCode(this.getItemNumber());
hash = 53 * hash + Objects.hashCode(this.getItemProduct());
hash = 53 * hash + Objects.hashCode(this.getItemProductQuantity());
hash = 53 * hash + Objects.hashCode(this.getItemReceipt());
+ hash = 53 * hash + Objects.hashCode(this.getItemCouponNumber());
return hash;
}