Skip to content

Commit 18bef93

Browse files
authored
Merge pull request #330 from IBM/johntimm-master
Issue #329 - Invalid SQL generated in ResourceDAOImpl
2 parents b8b3851 + 301c86a commit 18bef93

12 files changed

Lines changed: 312 additions & 156 deletions

File tree

fhir-core/src/main/java/com/ibm/fhir/core/context/FHIRPagingContext.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ public interface FHIRPagingContext {
1010
int getLastPageNumber();
1111
int getPageNumber();
1212
int getPageSize();
13-
long getTotalCount();
13+
int getTotalCount();
1414
void setLastPageNumber(int lastPageNumber);
1515
void setPageNumber(int pageNumber);
1616
void setPageSize(int pageSize);
17-
void setTotalCount(long totalCount);
17+
void setTotalCount(int totalCount);
18+
boolean isLenient();
19+
void setLenient(boolean lenient);
1820
}

fhir-core/src/main/java/com/ibm/fhir/core/context/impl/FHIRPagingContextImpl.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public class FHIRPagingContextImpl implements FHIRPagingContext {
1616
protected int lastPageNumber;
1717
protected int pageNumber;
1818
protected int pageSize;
19-
protected long totalCount;
19+
protected int totalCount;
20+
protected boolean lenient = true;
2021

2122
public FHIRPagingContextImpl() {
2223
this.pageNumber = DEFAULT_PAGE_NUMBER;
@@ -40,7 +41,7 @@ public int getPageSize() {
4041
}
4142

4243
@Override
43-
public long getTotalCount() {
44+
public int getTotalCount() {
4445
return totalCount;
4546
}
4647

@@ -60,7 +61,17 @@ public void setPageSize(int pageSize) {
6061
}
6162

6263
@Override
63-
public void setTotalCount(long totalCount) {
64+
public void setTotalCount(int totalCount) {
6465
this.totalCount = totalCount;
6566
}
67+
68+
@Override
69+
public boolean isLenient() {
70+
return lenient;
71+
}
72+
73+
@Override
74+
public void setLenient(boolean lenient) {
75+
this.lenient = lenient;
76+
}
6677
}

0 commit comments

Comments
 (0)