From: Roland Häder Date: Fri, 22 Sep 2017 22:00:51 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=564e7133429650cfa3021232807842058a2e497c;p=juser-activity-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/jusercore/model/user/activity/LogableUserActivity.java b/src/org/mxchange/jusercore/model/user/activity/LogableUserActivity.java index c85573a..31a602f 100644 --- a/src/org/mxchange/jusercore/model/user/activity/LogableUserActivity.java +++ b/src/org/mxchange/jusercore/model/user/activity/LogableUserActivity.java @@ -17,7 +17,7 @@ package org.mxchange.jusercore.model.user.activity; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jcontacts.model.contact.title.PersonalTitle; import org.mxchange.jusercore.model.user.User; @@ -75,14 +75,14 @@ public interface LogableUserActivity extends Serializable { *

* @return Activity timestamp */ - Calendar getActivityTimestamp (); + Date getActivityTimestamp (); /** * Setter for activity timestamp *

* @param activityTimestamp Activity timestamp */ - void setActivityTimestamp (final Calendar activityTimestamp); + void setActivityTimestamp (final Date activityTimestamp); /** * Getter for activity type diff --git a/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java b/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java index 24c01f4..a5e56ce 100644 --- a/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java +++ b/src/org/mxchange/jusercore/model/user/activity/UserActivityLog.java @@ -17,7 +17,7 @@ package org.mxchange.jusercore.model.user.activity; import java.text.MessageFormat; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -118,7 +118,7 @@ public class UserActivityLog implements LogableUserActivity { @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "activity_timestamp", nullable = false, updatable = false) - private Calendar activityTimestamp; + private Date activityTimestamp; /** * Type @@ -155,7 +155,7 @@ public class UserActivityLog implements LogableUserActivity { * @param activityUser User instance * @param activityTimestamp imestamp */ - public UserActivityLog (final String activityMessage, final String activityType, final User activityUser, final Calendar activityTimestamp) { + public UserActivityLog (final String activityMessage, final String activityType, final User activityUser, final Date activityTimestamp) { // Call other constructor this(activityType, activityUser, activityTimestamp); @@ -179,7 +179,7 @@ public class UserActivityLog implements LogableUserActivity { * @param activityUser User instance * @param activityTimestamp imestamp */ - public UserActivityLog (final String activityType, final User activityUser, final Calendar activityTimestamp) { + public UserActivityLog (final String activityType, final User activityUser, final Date activityTimestamp) { // Make sure all is set if (null == activityType) { // Throw NPE @@ -231,7 +231,7 @@ public class UserActivityLog implements LogableUserActivity { * @param activityTimestamp imestamp * @param principalName Principal name */ - public UserActivityLog (final String activityMessage, final String activityType, final User activityUser, final Calendar activityTimestamp, final String principalName) { + public UserActivityLog (final String activityMessage, final String activityType, final User activityUser, final Date activityTimestamp, final String principalName) { // Call other constructor this(activityMessage, activityType, activityUser, activityTimestamp); @@ -247,7 +247,7 @@ public class UserActivityLog implements LogableUserActivity { * @param activityTimestamp imestamp * @param principalName Principal name */ - public UserActivityLog (final String activityType, final User activityUser, final Calendar activityTimestamp, final String principalName) { + public UserActivityLog (final String activityType, final User activityUser, final Date activityTimestamp, final String principalName) { // Call other constructor this(activityType, activityUser, activityTimestamp); @@ -346,13 +346,13 @@ public class UserActivityLog implements LogableUserActivity { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getActivityTimestamp () { + public Date getActivityTimestamp () { return this.activityTimestamp; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setActivityTimestamp (final Calendar activityTimestamp) { + public void setActivityTimestamp (final Date activityTimestamp) { this.activityTimestamp = activityTimestamp; } diff --git a/src/org/mxchange/jusercore/model/user/activity/comparator/UserActivityLogTimestampComparator.java b/src/org/mxchange/jusercore/model/user/activity/comparator/UserActivityLogTimestampComparator.java index df4a2a4..ca24eb6 100644 --- a/src/org/mxchange/jusercore/model/user/activity/comparator/UserActivityLogTimestampComparator.java +++ b/src/org/mxchange/jusercore/model/user/activity/comparator/UserActivityLogTimestampComparator.java @@ -28,7 +28,7 @@ public class UserActivityLogTimestampComparator implements Comparator