Skip to content

Commit

Permalink
[#8628] Migrate FeedbackSessionAttributes time fields from Date to In…
Browse files Browse the repository at this point in the history
…stant (#8629)
  • Loading branch information
whipermr5 committed Mar 14, 2018
1 parent 4d8b090 commit 30f0012
Show file tree
Hide file tree
Showing 96 changed files with 1,305 additions and 1,467 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AdminEmailAttributes extends EntityAttributes<AdminEmail> {
public boolean isInTrashBin;

AdminEmailAttributes() {
createDate = Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP;
createDate = Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE;
emailId = Const.ParamsNames.ADMIN_EMAIL_ID;
}

Expand All @@ -39,7 +39,7 @@ public class AdminEmailAttributes extends EntityAttributes<AdminEmail> {
* <p>Following default values are set to corresponding attributes:
* <ul>
* <li>{@code null} for {@code sendDate}</li>
* <li>{@code Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP} for {@code createDate}</li>
* <li>{@code Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE} for {@code createDate}</li>
* <li>{@code Const.ParamsNames.ADMIN_EMAIL_ID} for {@code emailId}</li>
* <li>{@code false} for {@code isInTrashBin}</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class CourseAttributes extends EntityAttributes<Course> implements Compar
this.id = SanitizationHelper.sanitizeTitle(courseId);
this.name = SanitizationHelper.sanitizeTitle(name);
this.timeZone = timeZone;
this.createdAt = TimeHelper.now();
this.createdAt = Instant.now();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public FeedbackQuestionAttributes getCopy() {
}

public Date getCreatedAt() {
return createdAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP : createdAt;
return createdAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE : createdAt;
}

public Date getUpdatedAt() {
return updatedAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP : updatedAt;
return updatedAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE : updatedAt;
}

public String getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public void setId(String feedbackResponseId) {
}

public Date getCreatedAt() {
return createdAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP : createdAt;
return createdAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE : createdAt;
}

public Date getUpdatedAt() {
return updatedAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP : updatedAt;
return updatedAt == null ? Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP_DATE : updatedAt;
}

@Override
Expand Down
Loading

0 comments on commit 30f0012

Please sign in to comment.