Override breakes stuff here for Kotlin
This commit is contained in:
parent
61adf61fc0
commit
c337fdde14
|
@ -50,14 +50,12 @@ public interface IAnyResource extends IBaseResource {
|
|||
|
||||
String getId();
|
||||
|
||||
@Override
|
||||
IIdType getIdElement();
|
||||
|
||||
IPrimitiveType<String> getLanguageElement();
|
||||
|
||||
Object getUserData(String name);
|
||||
|
||||
@Override
|
||||
IAnyResource setId(String theId);
|
||||
|
||||
void setUserData(String name, Object value);
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package cn.uhn.fhir.jaxrs.server.example
|
||||
|
||||
import ca.uhn.fhir.model.api.annotation.ResourceDef
|
||||
import org.hl7.fhir.dstu3.model.BaseResource
|
||||
import org.hl7.fhir.dstu3.model.Organization
|
||||
import org.hl7.fhir.instance.model.api.IIdType
|
||||
|
||||
@ResourceDef(name = "Organization")
|
||||
open class ExtendedOrganization : Organization() {
|
||||
|
||||
override fun setId(value: IIdType?): BaseResource? {
|
||||
return this
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import ca.uhn.fhir.rest.annotation.OptionalParam
|
|||
import ca.uhn.fhir.rest.annotation.Search
|
||||
import ca.uhn.fhir.rest.api.Constants
|
||||
import ca.uhn.fhir.rest.param.StringParam
|
||||
import org.hl7.fhir.instance.model.api.IAnyResource
|
||||
import org.hl7.fhir.dstu3.model.Organization
|
||||
import javax.ejb.Stateless
|
||||
import javax.ws.rs.Path
|
||||
import javax.ws.rs.Produces
|
||||
|
@ -17,19 +17,17 @@ import javax.ws.rs.core.MediaType
|
|||
@Path("Organization")
|
||||
@Stateless
|
||||
@Produces(MediaType.APPLICATION_JSON, Constants.CT_FHIR_JSON, Constants.CT_FHIR_XML)
|
||||
class ExtendedOrganizationResource : BaseResource<ExtendedOrganization>() {
|
||||
override fun getResourceType(): Class<ExtendedOrganization>? = ExtendedOrganization::class.java
|
||||
class ExtendedOrganizationResource : AbstractJaxRsResourceProvider<Organization>(FhirContext.forDstu3()) {
|
||||
override fun getResourceType(): Class<Organization>? = Organization::class.java
|
||||
|
||||
@Search
|
||||
fun find(
|
||||
@OptionalParam(name = "_id") theId: StringParam?,
|
||||
@IncludeParam(allow = ["Patient:general-practitioner"]) includes: Collection<Include>?
|
||||
): List<ExtendedOrganization> {
|
||||
val organization = ExtendedOrganization().also {
|
||||
): List<Organization> {
|
||||
val organization = Organization().also {
|
||||
it.id = "id"
|
||||
}
|
||||
return listOf(organization)
|
||||
}
|
||||
}
|
||||
|
||||
abstract class BaseResource<T: IAnyResource>: AbstractJaxRsResourceProvider<T>(FhirContext.forDstu3())
|
||||
|
|
Loading…
Reference in New Issue