From: Roland Häder Date: Fri, 22 Sep 2017 21:55:24 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=482bc688206992f6390a4cf50223c658a89296a7;p=jfinancials-core.git Continued: - need to change java.util.Calendar (bye bye) to java.util.Date in favour of PrimeFaces' p:calendar [!] tag Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jfinancials/model/income/BillableIncome.java b/src/org/mxchange/jfinancials/model/income/BillableIncome.java index bd166a3..7953247 100644 --- a/src/org/mxchange/jfinancials/model/income/BillableIncome.java +++ b/src/org/mxchange/jfinancials/model/income/BillableIncome.java @@ -17,7 +17,7 @@ package org.mxchange.jfinancials.model.income; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jfinancials.model.income.interval.FinancialInterval; import org.mxchange.jusercore.model.user.User; @@ -47,14 +47,14 @@ public interface BillableIncome extends Serializable { *

* @return Income-created timestamp */ - Calendar getIncomeCreated (); + Date getIncomeCreated (); /** * Setter for income-created timestamp *

* @param incomeCreated Income-created timestamp */ - void setIncomeCreated (final Calendar incomeCreated); + void setIncomeCreated (final Date incomeCreated); /** * Getter for whether income is enabled @@ -117,14 +117,14 @@ public interface BillableIncome extends Serializable { *

* @return Income-updated timestamp */ - Calendar getIncomeUpdated (); + Date getIncomeUpdated (); /** * Setter for income-updated timestamp *

* @param incomeUpdated Income-updated timestamp */ - void setIncomeUpdated (final Calendar incomeUpdated); + void setIncomeUpdated (final Date incomeUpdated); /** * Getter for connected user account diff --git a/src/org/mxchange/jfinancials/model/income/FinancialIncome.java b/src/org/mxchange/jfinancials/model/income/FinancialIncome.java index cce7547..73dfc96 100644 --- a/src/org/mxchange/jfinancials/model/income/FinancialIncome.java +++ b/src/org/mxchange/jfinancials/model/income/FinancialIncome.java @@ -16,7 +16,7 @@ */ package org.mxchange.jfinancials.model.income; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -59,7 +59,7 @@ public class FinancialIncome implements BillableIncome { @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "income_created", nullable = false, updatable = false) - private Calendar incomeCreated; + private Date incomeCreated; /** * Income enabled (default) or disabled (no longer receiving income but need @@ -104,7 +104,7 @@ public class FinancialIncome implements BillableIncome { */ @Temporal (TemporalType.TIMESTAMP) @Column (name = "income_updated", insertable = false) - private Calendar incomeUpdated; + private Date incomeUpdated; /** * Connected user account @@ -166,13 +166,13 @@ public class FinancialIncome implements BillableIncome { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getIncomeCreated () { + public Date getIncomeCreated () { return this.incomeCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setIncomeCreated (Calendar incomeCreated) { + public void setIncomeCreated (Date incomeCreated) { this.incomeCreated = incomeCreated; } @@ -228,13 +228,13 @@ public class FinancialIncome implements BillableIncome { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getIncomeUpdated () { + public Date getIncomeUpdated () { return this.incomeUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setIncomeUpdated (Calendar incomeUpdated) { + public void setIncomeUpdated (Date incomeUpdated) { this.incomeUpdated = incomeUpdated; } diff --git a/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java b/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java index 06b33ff..cb58bf6 100644 --- a/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java +++ b/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java @@ -17,7 +17,7 @@ package org.mxchange.jfinancials.model.receipt; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; import org.mxchange.jproduct.model.payment.PaymentType; import org.mxchange.jusercore.model.user.User; @@ -34,28 +34,28 @@ public interface BillableReceipt extends Serializable { *

* @return Receipt creation timestamp */ - Calendar getReceiptCreated (); + Date getReceiptCreated (); /** * Setter for when this receipt has been created in database *

* @param receiptCreated Receipt creation timestamp */ - void setReceiptCreated (final Calendar receiptCreated); + void setReceiptCreated (final Date receiptCreated); /** * Getter for when this receipt has been issued (as written on it) *

* @return Receipt issue timestamp */ - Calendar getReceiptIssued (); + Date getReceiptIssued (); /** * Setter for when this receipt has been issued (as written on it) *

* @param receiptIssued Receipt issue timestamp */ - void setReceiptIssued (final Calendar receiptIssued); + void setReceiptIssued (final Date receiptIssued); /** * Getter for primary key diff --git a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java index ede7bed..7993c96 100644 --- a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java +++ b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java @@ -17,7 +17,7 @@ package org.mxchange.jfinancials.model.receipt; import java.text.MessageFormat; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -78,7 +78,7 @@ public class FinancialReceipt implements BillableReceipt { @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "receipt_created", nullable = false) - private Calendar receiptCreated; + private Date receiptCreated; /** * Primary key @@ -94,7 +94,7 @@ public class FinancialReceipt implements BillableReceipt { @Basic (optional = false) @Temporal (TemporalType.DATE) @Column (name = "receipt_issued", nullable = false) - private Calendar receiptIssued; + private Date receiptIssued; /** * Receipt number @@ -134,7 +134,7 @@ public class FinancialReceipt implements BillableReceipt { * @throws NullPointerException If user instance is not set * @throws IllegalArgumentException If user instance's userId is invalid */ - public FinancialReceipt (final PaymentType receiptPaymentType, final BranchOffice receiptBranchOffice, final User receiptUser, final Calendar receiptIssued) { + public FinancialReceipt (final PaymentType receiptPaymentType, final BranchOffice receiptBranchOffice, final User receiptUser, final Date receiptIssued) { // Call other constructor first this(receiptPaymentType, receiptBranchOffice, receiptIssued); @@ -164,7 +164,7 @@ public class FinancialReceipt implements BillableReceipt { * @throws NullPointerException If user instance is not set * @throws IllegalArgumentException If branchId is invalid */ - public FinancialReceipt (final PaymentType receiptPaymentType, final BranchOffice receiptBranchOffice, final Calendar receiptIssued) { + public FinancialReceipt (final PaymentType receiptPaymentType, final BranchOffice receiptBranchOffice, final Date receiptIssued) { // Call other constructor first this(); @@ -234,13 +234,13 @@ public class FinancialReceipt implements BillableReceipt { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getReceiptCreated () { + public Date getReceiptCreated () { return this.receiptCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setReceiptCreated (final Calendar receiptCreated) { + public void setReceiptCreated (final Date receiptCreated) { this.receiptCreated = receiptCreated; } @@ -256,13 +256,13 @@ public class FinancialReceipt implements BillableReceipt { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getReceiptIssued () { + public Date getReceiptIssued () { return this.receiptIssued; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setReceiptIssued (final Calendar receiptIssued) { + public void setReceiptIssued (final Date receiptIssued) { this.receiptIssued = receiptIssued; } diff --git a/src/org/mxchange/jfinancials/model/receipt/entry/BillableReceiptEntry.java b/src/org/mxchange/jfinancials/model/receipt/entry/BillableReceiptEntry.java index 4564c54..9802067 100644 --- a/src/org/mxchange/jfinancials/model/receipt/entry/BillableReceiptEntry.java +++ b/src/org/mxchange/jfinancials/model/receipt/entry/BillableReceiptEntry.java @@ -17,7 +17,7 @@ package org.mxchange.jfinancials.model.receipt.entry; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jfinancials.model.receipt.BillableReceipt; import org.mxchange.jproduct.model.product.Product; @@ -33,14 +33,14 @@ public interface BillableReceiptEntry extends Serializable { *

* @return When this entry has been created */ - Calendar getEntryCreated (); + Date getEntryCreated (); /** * Setter when this receipt entry has been created in database *

* @param entryCreated When this entry has been created */ - void setEntryCreated (final Calendar entryCreated); + void setEntryCreated (final Date entryCreated); /** * Getter for primary key diff --git a/src/org/mxchange/jfinancials/model/receipt/entry/ReceiptEntry.java b/src/org/mxchange/jfinancials/model/receipt/entry/ReceiptEntry.java index c0bc977..b17f7ce 100644 --- a/src/org/mxchange/jfinancials/model/receipt/entry/ReceiptEntry.java +++ b/src/org/mxchange/jfinancials/model/receipt/entry/ReceiptEntry.java @@ -16,7 +16,7 @@ */ package org.mxchange.jfinancials.model.receipt.entry; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -64,7 +64,7 @@ public class ReceiptEntry implements BillableReceiptEntry { @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "entry_created", nullable = false) - private Calendar entryCreated; + private Date entryCreated; /** * Primary key @@ -156,13 +156,13 @@ public class ReceiptEntry implements BillableReceiptEntry { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getEntryCreated () { + public Date getEntryCreated () { return this.entryCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setEntryCreated (final Calendar entryCreated) { + public void setEntryCreated (final Date entryCreated) { this.entryCreated = entryCreated; }