remove demand for paging provider
This commit is contained in:
parent
9f3b262d6d
commit
950096d42f
|
@ -24,12 +24,17 @@ public class MdmPageRequest {
|
|||
private final int myOffset;
|
||||
private final int myCount;
|
||||
|
||||
public MdmPageRequest(@Nullable UnsignedIntType theOffset, @Nullable UnsignedIntType theCount, IPagingProvider thePagingProvider) {
|
||||
public MdmPageRequest(@Nullable UnsignedIntType theOffset, @Nullable UnsignedIntType theCount, int theDefaultPageSize, int theMaximumPageSize) {
|
||||
myOffset = theOffset == null ? 0 : theOffset.getValue();
|
||||
myCount = theCount == null
|
||||
? thePagingProvider.getDefaultPageSize() : theCount.getValue() > thePagingProvider.getMaximumPageSize()
|
||||
? thePagingProvider.getMaximumPageSize() : theCount.getValue();
|
||||
myCount = theCount == null ? theDefaultPageSize : Math.min(theCount.getValue(), theMaximumPageSize);
|
||||
validatePagingParameters(myOffset, myCount);
|
||||
|
||||
this.myPage = myOffset / myCount;
|
||||
}
|
||||
|
||||
public MdmPageRequest(@Nullable Integer theOffset, @Nullable Integer theCount, int theDefaultPageSize, int theMaximumPageSize) {
|
||||
myOffset = theOffset == null ? 0 : theOffset;
|
||||
myCount = theCount == null ? theDefaultPageSize : Math.min(theCount, theMaximumPageSize);
|
||||
validatePagingParameters(myOffset, myCount);
|
||||
|
||||
this.myPage = myOffset / myCount;
|
||||
|
|
|
@ -213,7 +213,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider {
|
|||
UnsignedIntType theCount,
|
||||
|
||||
ServletRequestDetails theRequestDetails) {
|
||||
MdmPageRequest mdmPageRequest = new MdmPageRequest(theOffset, theCount, myPagingProvider);
|
||||
MdmPageRequest mdmPageRequest = new MdmPageRequest(theOffset, theCount, myPagingProvider.getDefaultPageSize(), myPagingProvider.getMaximumPageSize());
|
||||
Page<MdmLinkJson> mdmLinkJson = myMdmControllerSvc.queryLinks(extractStringOrNull(theGoldenResourceId),
|
||||
extractStringOrNull(theResourceId), extractStringOrNull(theMatchResult), extractStringOrNull(theLinkSource),
|
||||
createMdmContext(theRequestDetails, MdmTransactionContext.OperationType.QUERY_LINKS,
|
||||
|
@ -233,7 +233,7 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider {
|
|||
UnsignedIntType theCount,
|
||||
ServletRequestDetails theRequestDetails) {
|
||||
|
||||
MdmPageRequest mdmPageRequest = new MdmPageRequest(theOffset, theCount, myPagingProvider);
|
||||
MdmPageRequest mdmPageRequest = new MdmPageRequest(theOffset, theCount, myPagingProvider.getDefaultPageSize(), myPagingProvider.getMaximumPageSize());
|
||||
|
||||
Page<MdmLinkJson> possibleDuplicates = myMdmControllerSvc.getDuplicateGoldenResources(createMdmContext(theRequestDetails, MdmTransactionContext.OperationType.DUPLICATE_GOLDEN_RESOURCES, (String) null), mdmPageRequest);
|
||||
|
||||
|
|
Loading…
Reference in New Issue