This commit is contained in:
_Bastler 2021-10-06 09:48:30 +02:00
parent 4b6d9233ac
commit 23ff8bd05e
3 changed files with 54 additions and 57 deletions

View File

@ -53,10 +53,10 @@ public class EntryManager {
/** /**
* Fetch by ranking. * Fetch by ranking.
* *
* @param date the date * @param date the date
* @param gravity the gravity * @param gravity the gravity
* @param page the page * @param page the page
* @param size the size * @param size the size
* @return the page * @return the page
*/ */
public Page<RankedEntry> fetchByRanking(Instant date, double gravity, int page, int size) { public Page<RankedEntry> fetchByRanking(Instant date, double gravity, int page, int size) {
@ -66,10 +66,10 @@ public class EntryManager {
/** /**
* Fetch by comments. * Fetch by comments.
* *
* @param date the date * @param date the date
* @param gravity the gravity * @param gravity the gravity
* @param page the page * @param page the page
* @param size the size * @param size the size
* @return the page * @return the page
*/ */
public Page<RankedEntry> fetchByComments(Instant date, double gravity, int page, int size) { public Page<RankedEntry> fetchByComments(Instant date, double gravity, int page, int size) {
@ -77,12 +77,11 @@ public class EntryManager {
} }
/** /**
* Fetch by comments. * Fetch by last comment.
* *
* @param date the date * @param date the date
* @param gravity the gravity * @param page the page
* @param page the page * @param size the size
* @param size the size
* @return the page * @return the page
*/ */
public Page<Entry> fetchByLastComment(Instant date, int page, int size) { public Page<Entry> fetchByLastComment(Instant date, int page, int size) {
@ -106,10 +105,10 @@ public class EntryManager {
* Fetch by user. * Fetch by user.
* *
* @param username the username * @param username the username
* @param date the date * @param date the date
* @param page the page * @param page the page
* @param size the size * @param size the size
* @param asc the asc * @param asc the asc
* @return the page * @return the page
*/ */
public Page<Entry> fetchByUser(String username, Instant date, int page, int size, boolean asc) { public Page<Entry> fetchByUser(String username, Instant date, int page, int size, boolean asc) {
@ -123,8 +122,8 @@ public class EntryManager {
* Fetch by bookmarks. * Fetch by bookmarks.
* *
* @param username the username * @param username the username
* @param page the page * @param page the page
* @param size the size * @param size the size
* @return the page * @return the page
*/ */
public Page<Entry> fetchByBookmarks(String username, int page, int size) { public Page<Entry> fetchByBookmarks(String username, int page, int size) {
@ -142,9 +141,9 @@ public class EntryManager {
* Apply metadata. * Apply metadata.
* *
* @param username the username * @param username the username
* @param karma the karma * @param karma the karma
* @param entry the entry * @param entry the entry
* @param ignore the ignore * @param ignore the ignore
*/ */
public void applyMetadata(String username, long karma, Entry entry, List<String> ignore) { public void applyMetadata(String username, long karma, Entry entry, List<String> ignore) {
@ -198,9 +197,9 @@ public class EntryManager {
* Apply metadata. * Apply metadata.
* *
* @param username the username * @param username the username
* @param karma the karma * @param karma the karma
* @param entries the entries * @param entries the entries
* @param ignore the ignore * @param ignore the ignore
*/ */
public void applyMetadata(String username, long karma, List<Entry> entries, public void applyMetadata(String username, long karma, List<Entry> entries,
List<String> ignore) { List<String> ignore) {
@ -267,7 +266,7 @@ public class EntryManager {
/** /**
* Gets the user points. * Gets the user points.
* *
* @param entryId the entry id * @param entryId the entry id
* @param username the username * @param username the username
* @return the user points * @return the user points
*/ */

View File

@ -64,11 +64,11 @@ public class EntryController extends BaseController {
/** /**
* Fetch by ranking. * Fetch by ranking.
* *
* @param pageParameter the page parameter * @param pageParameter the page parameter
* @param sizeParameter the size parameter * @param sizeParameter the size parameter
* @param dateParameter the date parameter * @param dateParameter the date parameter
* @param gravityParameter the gravity parameter * @param gravityParameter the gravity parameter
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the page * @return the page
*/ */
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@ -103,9 +103,9 @@ public class EntryController extends BaseController {
/** /**
* Fetch by date. * Fetch by date.
* *
* @param pageParameter the page parameter * @param pageParameter the page parameter
* @param sizeParameter the size parameter * @param sizeParameter the size parameter
* @param dateParameter the date parameter * @param dateParameter the date parameter
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the page * @return the page
*/ */
@ -131,11 +131,11 @@ public class EntryController extends BaseController {
/** /**
* Fetch by comments. * Fetch by comments.
* *
* @param pageParameter the page parameter * @param pageParameter the page parameter
* @param sizeParameter the size parameter * @param sizeParameter the size parameter
* @param dateParameter the date parameter * @param dateParameter the date parameter
* @param gravityParameter the gravity parameter * @param gravityParameter the gravity parameter
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the page * @return the page
*/ */
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@ -167,13 +167,12 @@ public class EntryController extends BaseController {
} }
/** /**
* Fetch by comments. * Fetch by last.
* *
* @param pageParameter the page parameter * @param pageParameter the page parameter
* @param sizeParameter the size parameter * @param sizeParameter the size parameter
* @param dateParameter the date parameter * @param dateParameter the date parameter
* @param gravityParameter the gravity parameter * @param ignoreParameter the ignore parameter
* @param ignoreParameter the ignore parameter
* @return the page * @return the page
*/ */
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@ -199,11 +198,11 @@ public class EntryController extends BaseController {
/** /**
* Fetch by user. * Fetch by user.
* *
* @param username the username * @param username the username
* @param pageParameter the page parameter * @param pageParameter the page parameter
* @param sizeParameter the size parameter * @param sizeParameter the size parameter
* @param dateParameter the date parameter * @param dateParameter the date parameter
* @param ascParameter the asc parameter * @param ascParameter the asc parameter
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the page * @return the page
*/ */
@ -232,7 +231,7 @@ public class EntryController extends BaseController {
/** /**
* Gets the entry. * Gets the entry.
* *
* @param id the id * @param id the id
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the entry * @return the entry
*/ */
@ -256,7 +255,7 @@ public class EntryController extends BaseController {
/** /**
* Creates the entry. * Creates the entry.
* *
* @param entry the entry * @param entry the entry
* @param ignoreParameter the ignore parameter * @param ignoreParameter the ignore parameter
* @return the entry * @return the entry
*/ */

View File

@ -58,8 +58,8 @@ public interface EntryRepository
/** /**
* Find all by ranking. * Find all by ranking.
* *
* @param before the before * @param before the before
* @param gravity the gravity * @param gravity the gravity
* @param pageable the pageable * @param pageable the pageable
* @return the page * @return the page
*/ */
@ -70,8 +70,8 @@ public interface EntryRepository
/** /**
* Find all by comments. * Find all by comments.
* *
* @param before the before * @param before the before
* @param gravity the gravity * @param gravity the gravity
* @param pageable the pageable * @param pageable the pageable
* @return the page * @return the page
*/ */
@ -80,10 +80,9 @@ public interface EntryRepository
@Param("gravity") double gravity, Pageable pageable); @Param("gravity") double gravity, Pageable pageable);
/** /**
* Find all by comments. * Find all by last comment.
* *
* @param before the before * @param before the before
* @param gravity the gravity
* @param pageable the pageable * @param pageable the pageable
* @return the page * @return the page
*/ */
@ -93,8 +92,8 @@ public interface EntryRepository
/** /**
* Find all by ranking archive. * Find all by ranking archive.
* *
* @param before the before * @param before the before
* @param gravity the gravity * @param gravity the gravity
* @param pageable the pageable * @param pageable the pageable
* @return the page * @return the page
*/ */