forked from gotson/komga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
related to gotson#216
- Loading branch information
Showing
9 changed files
with
153 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/UnpagedSorted.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.gotson.komga.infrastructure.jooq | ||
|
||
import org.springframework.data.domain.Pageable | ||
import org.springframework.data.domain.Sort | ||
|
||
class UnpagedSorted( | ||
private val sort: Sort | ||
) : Pageable { | ||
|
||
override fun getPageNumber(): Int { | ||
throw UnsupportedOperationException() | ||
} | ||
|
||
override fun hasPrevious(): Boolean = false | ||
|
||
override fun getSort(): Sort = sort | ||
|
||
override fun isPaged(): Boolean = false | ||
|
||
override fun next(): Pageable = this | ||
|
||
override fun getPageSize(): Int { | ||
throw UnsupportedOperationException() | ||
} | ||
|
||
override fun getOffset(): Long { | ||
throw UnsupportedOperationException() | ||
} | ||
|
||
override fun first(): Pageable = this | ||
|
||
override fun previousOrFirst(): Pageable = this | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters