Add constructor and javadocs
This commit is contained in:
parent
da6a5d5a24
commit
f2f09d03df
|
@ -26,12 +26,56 @@ import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represents a restful search operation parameter for an "OR list" of tokens (in other words, a
|
||||||
|
* list which can contain one-or-more tokens, where the server should return results matching any of the tokens)
|
||||||
|
*/
|
||||||
public class TokenOrListParam extends BaseOrListParam<TokenParam> {
|
public class TokenOrListParam extends BaseOrListParam<TokenParam> {
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
TokenParam newInstance() {
|
* Create a new empty token "OR list"
|
||||||
return new TokenParam();
|
*/
|
||||||
|
public TokenOrListParam() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new token "OR list" with a single token, or multiple tokens which have the same system value
|
||||||
|
*
|
||||||
|
* @param theSystem
|
||||||
|
* The system to use for the one token to pre-populate in this list
|
||||||
|
* @param theValues
|
||||||
|
* The values to use for the one token to pre-populate in this list
|
||||||
|
*/
|
||||||
|
public TokenOrListParam(String theSystem, String... theValues) {
|
||||||
|
for (String next : theValues) {
|
||||||
|
add(theSystem, next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method which adds a token to this OR list using the system and code from a coding
|
||||||
|
*/
|
||||||
|
public void add(BaseCodingDt theCodingDt) {
|
||||||
|
add(new TokenParam(theCodingDt));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method which adds a token to this OR list using the system and value from an identifier
|
||||||
|
*/
|
||||||
|
public void add(BaseIdentifierDt theIdentifierDt) {
|
||||||
|
add(new TokenParam(theIdentifierDt));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new token to this list
|
||||||
|
*
|
||||||
|
* @param theSystem
|
||||||
|
* The system to use for the one token to pre-populate in this list
|
||||||
|
* @param theValue
|
||||||
|
* The value to use for the one token to pre-populate in this list
|
||||||
|
*/
|
||||||
|
public void add(String theSystem, String theValue) {
|
||||||
|
add(new TokenParam(theSystem, theValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BaseCodingDt> getListAsCodings() {
|
public List<BaseCodingDt> getListAsCodings() {
|
||||||
|
@ -45,20 +89,9 @@ public class TokenOrListParam extends BaseOrListParam<TokenParam> {
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Convenience method which adds a token to this OR list
|
TokenParam newInstance() {
|
||||||
* using the system and code from a coding
|
return new TokenParam();
|
||||||
*/
|
|
||||||
public void add(BaseCodingDt theCodingDt) {
|
|
||||||
add(new TokenParam(theCodingDt));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience method which adds a token to this OR list
|
|
||||||
* using the system and value from an identifier
|
|
||||||
*/
|
|
||||||
public void add(BaseIdentifierDt theIdentifierDt) {
|
|
||||||
add(new TokenParam(theIdentifierDt));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue