View Javadoc
1   package ca.uhn.fhir.model.api.annotation;
2   
3   /*
4    * #%L
5    * HAPI FHIR - Core Library
6    * %%
7    * Copyright (C) 2014 - 2018 University Health Network
8    * %%
9    * Licensed under the Apache License, Version 2.0 (the "License");
10   * you may not use this file except in compliance with the License.
11   * You may obtain a copy of the License at
12   * 
13   *      http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS,
17   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   * See the License for the specific language governing permissions and
19   * limitations under the License.
20   * #L%
21   */
22  
23  import java.lang.annotation.ElementType;
24  import java.lang.annotation.Retention;
25  import java.lang.annotation.RetentionPolicy;
26  import java.lang.annotation.Target;
27  
28  import org.hl7.fhir.instance.model.api.IBaseResource;
29  
30  @Target(value=ElementType.FIELD)
31  @Retention(RetentionPolicy.RUNTIME)
32  public @interface SearchParamDefinition {
33  
34  	/**
35  	 * The name for this parameter
36  	 */
37  	String name();
38  	
39  	/**
40  	 * The path for this parameter
41  	 */
42  	String path();
43  	
44  	/**
45  	 * A description of this parameter
46  	 */
47  	String description() default "";
48  	
49  	/**
50  	 * The type for this parameter, e.g. "string", or "token"
51  	 */
52  	String type() default "string";
53  	
54  	/**
55  	 * If the parameter is of type "composite", this parameter lists the names of the parameters 
56  	 * which this parameter is a composite of. E.g. "name-value-token" is a composite of "name" and "value-token".
57  	 * <p>
58  	 * If the parameter is not a composite, this parameter must be empty
59  	 * </p>
60  	 */
61  	String[] compositeOf() default {};
62  
63  	/**
64  	 * For search params of type "reference", this can optionally be used to
65  	 * specify the resource type(s) that this parameter applies to.
66  	 */
67  	Class<? extends IBaseResource>[] target() default {};
68  	
69  	/**
70  	 * Indicates that this field indicates that resources linked to by this parameter
71  	 * (must be a reference parameter) place the resource in the given compartment.
72  	 */
73  	Compartment[] providesMembershipIn() default {};
74  
75  }