Annotation Interface Read


@Retention(RUNTIME) @Target(METHOD) public @interface Read
RESTful method annotation to be used for the FHIR read and vread method.

if you wish to support vread as well as read, you can use the version() attribute to set it to true, indicating the method will handle both reads and vreads.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends IBaseResource>
    The return type for this method.
    This method allows the return type for this method to be specified in a non-type-specific way, using the text name of the resource, e.g.
    boolean
    If set to true (default is false), this method supports vread operation as well as read
  • Element Details

    • 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 using IBasicClient or IRestfulClient, 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 or List<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
    • typeName

      This method allows the return type for this method to be specified in a non-type-specific way, using the text name of the resource, e.g. "Patient". This attribute should be populate, or type() should be, but not both.
      Since:
      5.4.0
      Default:
      ""
    • version

      boolean version
      If set to true (default is false), this method supports vread operation as well as read
      Default:
      false