enabled retrieve all items from paginated end points
This commit is contained in:
+7
-5
@@ -169,11 +169,13 @@ public class JournalEntryReadPlatformServiceImpl implements JournalEntryReadPlat
|
||||
maxLimitAllowed = limit;
|
||||
}
|
||||
sqlBuilder.append(" limit ").append(maxLimitAllowed);
|
||||
}
|
||||
|
||||
if (offset != null) {
|
||||
sqlBuilder.append(" offset ").append(offset);
|
||||
}
|
||||
if (offset != null) {
|
||||
sqlBuilder.append(" offset ").append(offset);
|
||||
}
|
||||
} else if (limit != null && limit == -1) {
|
||||
;
|
||||
} else
|
||||
sqlBuilder.append(" limit ").append(200);
|
||||
|
||||
final Object[] finalObjectArray = Arrays.copyOf(objectArray, arrayPos);
|
||||
final String sqlCountRows = "SELECT FOUND_ROWS()";
|
||||
|
||||
+3
-4
@@ -103,10 +103,9 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService
|
||||
|
||||
if (searchParameters.isLimited()) {
|
||||
sqlBuilder.append(" limit ").append(searchParameters.getLimit());
|
||||
}
|
||||
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
}
|
||||
}
|
||||
|
||||
final String sqlCountRows = "SELECT FOUND_ROWS()";
|
||||
|
||||
+4
-5
@@ -208,11 +208,10 @@ public class CenterReadPlatformServiceImpl implements CenterReadPlatformService
|
||||
|
||||
if (searchParameters.isLimited()) {
|
||||
sqlBuilder.append(" limit ").append(searchParameters.getLimit());
|
||||
}
|
||||
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
}
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
}
|
||||
}
|
||||
|
||||
final String sqlCountRows = "SELECT FOUND_ROWS()";
|
||||
return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlCountRows, sqlBuilder.toString(),
|
||||
|
||||
+3
-4
@@ -126,10 +126,9 @@ public class GroupReadPlatformServiceImpl implements GroupReadPlatformService {
|
||||
|
||||
if (searchParameters.isLimited()) {
|
||||
sqlBuilder.append(" limit ").append(searchParameters.getLimit());
|
||||
}
|
||||
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
if (searchParameters.isOffset()) {
|
||||
sqlBuilder.append(" offset ").append(searchParameters.getOffset());
|
||||
}
|
||||
}
|
||||
|
||||
final String sqlCountRows = "SELECT FOUND_ROWS()";
|
||||
|
||||
+6
-5
@@ -70,12 +70,13 @@ public final class SearchParameters {
|
||||
return StringUtils.isNotBlank(this.sortOrder);
|
||||
}
|
||||
|
||||
public static Integer getCheckedLimit(Integer maxLimitAllowed, Integer limit)
|
||||
{
|
||||
public static Integer getCheckedLimit(Integer maxLimitAllowed, Integer limit) {
|
||||
if (limit != null && limit < maxLimitAllowed && limit > 0) {
|
||||
maxLimitAllowed = limit;
|
||||
}
|
||||
return maxLimitAllowed;
|
||||
return limit;
|
||||
} else if (limit != null && limit == -1) {
|
||||
return null;
|
||||
} else
|
||||
return maxLimitAllowed;
|
||||
}
|
||||
|
||||
public String getSqlSearch() {
|
||||
|
||||
Reference in New Issue
Block a user