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;
* <p>
* @return Activity timestamp
*/
- Calendar getActivityTimestamp ();
+ Date getActivityTimestamp ();
/**
* Setter for activity timestamp
* <p>
* @param activityTimestamp Activity timestamp
*/
- void setActivityTimestamp (final Calendar activityTimestamp);
+ void setActivityTimestamp (final Date activityTimestamp);
/**
* Getter for activity type
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;
@Basic (optional = false)
@Temporal (TemporalType.TIMESTAMP)
@Column (name = "activity_timestamp", nullable = false, updatable = false)
- private Calendar activityTimestamp;
+ private Date activityTimestamp;
/**
* Type
* @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);
* @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
* @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);
* @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);
@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;
}