
Annotation Type Read
-
@Retention(RUNTIME) @Target(METHOD) public @interface Read
RESTful method annotation to be used for the FHIR read and vread method.If this method has a parameter annotated with the
IdParam
annotation and a parameter annotated with theVersionIdParam
annotation, the method will be treated as a vread method. If the method has only a parameter annotated with theIdParam
annotation, it will be treated as a read operation. theIf you wish for your server to support both read and vread operations, you will need two methods annotated with this annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<? extends IBaseResource>
type
The return type for this method.boolean
version
If set to true (default is false), this method supports vread operation as well as read
-
-
-
Element Detail
-
type
Class<? extends IBaseResource> type
The return type for this method. This generally does not need to be populated for IResourceProvider in a server implementation, but often does need to be populated in client implementations usingIBasicClient
orIRestfulClient
, or in plain providers on a server.This value also does not need to be populated if the return type for a method annotated with this annotation is sufficient to determine the type of resource provided. E.g. if the method returns
Patient
orList<Patient>
, the server/client will automatically determine that the Patient resource is the return type, and this value may be left blank.- Default:
- org.hl7.fhir.instance.model.api.IBaseResource.class
-
-
-
version
boolean version
If set to true (default is false), this method supports vread operation as well as read- Default:
- false
-
-