@Delete() public void deletePatientConditional(@IdParam IdType theId, @ConditionalUrlParam String theConditionalUrl) { // Only one of theId or theConditionalUrl will have a value depending // on whether the URL receieved was a logical ID, or a conditional // search string if (theId != null) { // do a normal delete } else { // do a conditional delete } // otherwise, delete was successful return; // can also return MethodOutcome } //END SNIPPET: deleteConditional
public DeleteMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Delete.class, theMethod.getAnnotation(Delete.class).type()); }
@Delete() public void deletePatient(@IdParam IdType theId) { // .. Delete the patient .. if (couldntFindThisId) { throw new ResourceNotFoundException("Unknown version"); } if (conflictHappened) { throw new ResourceVersionConflictException("Couldn't delete because [foo]"); } // otherwise, delete was successful return; // can also return MethodOutcome } //END SNIPPET: delete
public DeleteMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Delete.class, theMethod.getAnnotation(Delete.class).type()); }
@Delete public MethodOutcome delete(@IdParam IIdType theId) { TreeMap<Long, T> versions = myIdToVersionToResourceMap.get(theId.getIdPart()); if (versions == null || versions.isEmpty()) { throw new ResourceNotFoundException(theId); } long nextVersion = versions.lastEntry().getKey() + 1L; IIdType id = store(null, theId.getIdPart(), nextVersion); myDeleteCount.incrementAndGet(); return new MethodOutcome() .setId(id); }
returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type();
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdDt theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type();
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdType theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
public DeleteMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Delete.class, theMethod.getAnnotation(Delete.class).type()); }
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdType theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
public DeleteMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod, theContext, theProvider, Delete.class, theMethod.getAnnotation(Delete.class).type()); }
@Delete public MethodOutcome delete(@IdParam IIdType theId) { TreeMap<Long, T> versions = myIdToVersionToResourceMap.get(theId.getIdPart()); if (versions == null || versions.isEmpty()) { throw new ResourceNotFoundException(theId); } long nextVersion = versions.lastEntry().getKey() + 1L; IIdType id = store(null, theId.getIdPart(), nextVersion); myDeleteCount.incrementAndGet(); return new MethodOutcome() .setId(id); }
returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type();
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdType theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type(); } else if (patch != null) { returnTypeFromAnnotation = patch.type();
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdType theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
@Delete() public MethodOutcome delete(HttpServletRequest theRequest, @IdParam IdDt theResource, @ConditionalUrlParam(supportsMultiple = true) String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().deleteByUrl(theConditional, theRequestDetails); } else { return getDao().delete(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }