
Annotation Type OptionalParam
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface OptionalParam
Parameter annotation which specifies a search parameter for aSearch
method.
-
-
Field Summary
Fields Modifier and Type Fields Description static String
ALLOW_CHAIN_ANY
static String
ALLOW_CHAIN_NOTCHAINED
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]
chainBlacklist
For reference parameters (ReferenceParam
) this value may be used to indicate which chain values (if any) are not valid for the given parameter.String[]
chainWhitelist
For reference parameters (ReferenceParam
) this value may be used to indicate which chain values (if any) are valid for the given parameter.Class<? extends IQueryParameterType>[]
compositeTypes
For composite parameters (CompositeParam
) this value may be used to indicate the parameter type(s) which may be referenced by this param.Class<? extends IBaseResource>[]
targetTypes
For resource reference parameters (ReferenceParam
) this value may be used to indicate the resource type(s) which may be referenced by this param.
-
-
-
Field Detail
-
ALLOW_CHAIN_ANY
static final String ALLOW_CHAIN_ANY
-
-
-
ALLOW_CHAIN_NOTCHAINED
static final String ALLOW_CHAIN_NOTCHAINED
-
-
Element Detail
-
name
String name
This is the name for the parameter. Generally this should be a simple string (e.g. "name", or "identifier") which will be the name of the URL parameter used to populate this method parameter.Most resource model classes have constants which may be used to supply values for this field, e.g.
Patient.SP_NAME
orObservation.SP_DATE
If you wish to specify a parameter for a resource reference which only accepts a specific chained value, it is also valid to supply a chained name here, such as "patient.name". It is recommended to supply this using constants where possible, e.g.
Observation.SP_SUBJECT + '.' + Patient.SP_IDENTIFIER
-
-
-
chainBlacklist
String[] chainBlacklist
For reference parameters (ReferenceParam
) this value may be used to indicate which chain values (if any) are not valid for the given parameter. Values here will supercede any values specified inchainWhitelist()
If the parameter annotated with this annotation is not a
ReferenceParam
, this value must not be populated.- Default:
- {}
-
-
-
chainWhitelist
String[] chainWhitelist
For reference parameters (ReferenceParam
) this value may be used to indicate which chain values (if any) are valid for the given parameter. If the list contains the valueALLOW_CHAIN_ANY
, all values are valid. (this is the default) If the list contains the valueALLOW_CHAIN_NOTCHAINED
then the reference param only supports the empty chain (i.e. the resource ID).Valid values for this parameter include:
chainWhitelist={ OptionalParam.ALLOW_CHAIN_NOTCHAINED }
- Only allow resource reference (no chaining allowed for this parameter)chainWhitelist={ OptionalParam.ALLOW_CHAIN_ANY }
- Allow any chaining at all (including a non chained value, this is the default)chainWhitelist={ "foo", "bar" }
- Allow property.foo and property.bar
Any values specified in
chainBlacklist()
will supercede (have priority over) values here.If the parameter annotated with this annotation is not a
ReferenceParam
, this value must not be populated.- Default:
- {"*"}
-
-
-
compositeTypes
Class<? extends IQueryParameterType>[] compositeTypes
For composite parameters (CompositeParam
) this value may be used to indicate the parameter type(s) which may be referenced by this param.If the parameter annotated with this annotation is not a
CompositeParam
, this value must not be populated.- Default:
- {}
-
-
-
targetTypes
Class<? extends IBaseResource>[] targetTypes
For resource reference parameters (ReferenceParam
) this value may be used to indicate the resource type(s) which may be referenced by this param.If the parameter annotated with this annotation is not a
ReferenceParam
, this value must not be populated.- Default:
- {}
-
-