Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up 4621 Add Date When Portlet Rating Was Made #1065

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
03a2d59
Added getting and setting the date the rating was made per
phillips1021 Dec 6, 2017
19509d1
Added getting and setting the date the rating was made in the
phillips1021 Dec 6, 2017
24d2f54
added method definitions for finding portlet ratings done within the
phillips1021 Dec 6, 2017
b0d5f28
implement methods for finding portlet ratings done within the
phillips1021 Dec 6, 2017
185eeda
added unit tests for finding portlet ratings done within the
phillips1021 Dec 6, 2017
abb4656
added two new end points for getting ratings that were done within
phillips1021 Dec 6, 2017
b0756f5
added unit tests for two new end points for getting ratings that were…
phillips1021 Dec 6, 2017
9f91d4a
added additional fields so that we can more information related to a
phillips1021 Dec 6, 2017
44bd696
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
994261e
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
6b1df42
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
99396e2
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
21d30eb
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
2587721
reformatted per Google Java Formatter
phillips1021 Dec 6, 2017
3ec0bb9
changed to use LocalDateTime instead for calculating Today minus
phillips1021 Dec 6, 2017
d6764ce
use a final field and make it clearer how the test code is setting
phillips1021 Dec 6, 2017
6545dad
removed println statement that is not needed
phillips1021 Dec 7, 2017
136a235
changed to use final integer constant for setting rating date in
phillips1021 Dec 11, 2017
19d516b
changed to use Java 8 LocalDateTime for calculating date minus
phillips1021 Dec 11, 2017
a094ddb
style(java): apply Google Java code style
ChristianMurphy Dec 11, 2017
cdecd30
Merge branch 'master' of https://github.com/Jasig/uPortal into UP-4621
ChristianMurphy Dec 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changed to use Java 8 LocalDateTime for calculating date minus
number of days back
  • Loading branch information
phillips1021 committed Dec 11, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 19d516b3af102586c8dfcf94cc18280680c97d52
Original file line number Diff line number Diff line change
@@ -354,8 +354,8 @@ public CriteriaQuery<MarketplaceRatingImpl> apply(
@OpenEntityManager(unitName = PERSISTENCE_UNIT_NAME)
public Set<IMarketplaceRating> getAllRatingsInLastXDays(int numberOfDaysBack) {

final Calendar queryDate = Calendar.getInstance();
queryDate.add(Calendar.DAY_OF_YEAR, 0 - numberOfDaysBack);
LocalDateTime todayMinusNumberOfDaysBack = LocalDateTime.now().minusDays(numberOfDaysBack);

final TypedQuery<MarketplaceRatingImpl> query =
this.createQuery(
this.createCriteriaQuery(
@@ -372,7 +372,7 @@ public CriteriaQuery<MarketplaceRatingImpl> apply(
input.greaterThanOrEqualTo(
definitionRoot.<java.util.Date>get(
"ratingDate"),
queryDate.getTime());
todayMinusNumberOfDaysBack.toDate());

criteriaQuery
.select(definitionRoot)