Add count(int) method to fluent client search
This commit is contained in:
parent
9dbeee3576
commit
4398040451
|
@ -1854,6 +1854,11 @@ public class GenericClient extends BaseClient implements IGenericClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IQuery limitTo(int theLimitTo) {
|
public IQuery limitTo(int theLimitTo) {
|
||||||
|
return count(theLimitTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IQuery count(int theLimitTo) {
|
||||||
if (theLimitTo > 0) {
|
if (theLimitTo > 0) {
|
||||||
myParamLimit = theLimitTo;
|
myParamLimit = theLimitTo;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -41,8 +41,22 @@ public interface IQuery<T> extends IClientExecutable<IQuery<T>, T>, IBaseQuery<I
|
||||||
|
|
||||||
ISort<T> sort();
|
ISort<T> sort();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the <code>_count</code> parameter, which indicates to the server how many resources should be returned
|
||||||
|
* on a single page.
|
||||||
|
*
|
||||||
|
* @deprecated This parameter is badly named, since FHIR calls this parameter "_count" and not "_limit". Use {@link #count(int)} instead (it also sets the _count parameter)
|
||||||
|
*/
|
||||||
IQuery<T> limitTo(int theLimitTo);
|
IQuery<T> limitTo(int theLimitTo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the <code>_count</code> parameter, which indicates to the server how many resources should be returned
|
||||||
|
* on a single page.
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
|
*/
|
||||||
|
IQuery<T> count(int theCount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Match only resources where the resource has the given tag. This parameter corresponds to
|
* Match only resources where the resource has the given tag. This parameter corresponds to
|
||||||
* the <code>_tag</code> URL parameter.
|
* the <code>_tag</code> URL parameter.
|
||||||
|
|
|
@ -40,6 +40,12 @@
|
||||||
and a QuestionnaireResponse, it would fail because the QuestionnaireResponse
|
and a QuestionnaireResponse, it would fail because the QuestionnaireResponse
|
||||||
validator wouldn't be able to find the questionnaire. This is now corrected.
|
validator wouldn't be able to find the questionnaire. This is now corrected.
|
||||||
</action>
|
</action>
|
||||||
|
<action type="add">
|
||||||
|
Add a new method to the generic/fluent client for searching:
|
||||||
|
<![CDATA[<code>.count(int)</code><br/>]]>
|
||||||
|
This replaces the existing ".limitTo(int)" method which has
|
||||||
|
now been deprocated because it was badly named and undocumented.
|
||||||
|
</action>
|
||||||
</release>
|
</release>
|
||||||
<release version="1.3" date="2015-11-14">
|
<release version="1.3" date="2015-11-14">
|
||||||
<action type="add">
|
<action type="add">
|
||||||
|
|
Loading…
Reference in New Issue