Package dev.dsf.fhir.dao.command
Class CreateCommand<R extends org.hl7.fhir.r4.model.Resource,D extends ResourceDao<R>>
java.lang.Object
dev.dsf.fhir.dao.command.AbstractCommand
dev.dsf.fhir.dao.command.AbstractCommandWithResource<R,D>
dev.dsf.fhir.dao.command.CreateCommand<R,D>
- All Implemented Interfaces:
Command,ModifyingCommand
- Direct Known Subclasses:
CreateStructureDefinitionCommand
public class CreateCommand<R extends org.hl7.fhir.r4.model.Resource,D extends ResourceDao<R>>
extends AbstractCommandWithResource<R,D>
implements ModifyingCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rprotected final EventGeneratorprotected final ReferenceCleanerprotected final ResponseGeneratorprotected jakarta.ws.rs.core.Responseprotected ca.uhn.fhir.validation.ValidationResultFields inherited from class dev.dsf.fhir.dao.command.AbstractCommandWithResource
dao, exceptionHandler, parameterConverter, referencesHelper, resourceFields inherited from class dev.dsf.fhir.dao.command.AbstractCommand
audit, authorizationHelper, bundle, entry, identity, index, returnType, serverBaseFields inherited from interface dev.dsf.fhir.dao.command.Command
URL_UUID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCreateCommand(int index, Identity identity, PreferReturnType returnType, org.hl7.fhir.r4.model.Bundle bundle, org.hl7.fhir.r4.model.Bundle.BundleEntryComponent entry, String serverBase, AuthorizationHelper authorizationHelper, R resource, D dao, ExceptionHandler exceptionHandler, ParameterConverter parameterConverter, ResponseGenerator responseGenerator, ReferenceExtractor referenceExtractor, ReferenceResolver referenceResolver, ReferenceCleaner referenceCleaner, EventGenerator eventGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected RcreateWithTransactionAndId(Connection connection, R resource, UUID uuid) voidexecute(Map<String, org.hl7.fhir.r4.model.IdType> idTranslationTable, Connection connection, ValidationHelper validationHelper, SnapshotGenerator snapshotGenerator) Optional<org.hl7.fhir.r4.model.Bundle.BundleEntryComponent>postExecute(Connection connection, EventHandler eventHandler) voidpreExecute(Map<String, org.hl7.fhir.r4.model.IdType> idTranslationTable, Connection connection, ValidationHelper validationHelper, SnapshotGenerator snapshotGenerator) Methods inherited from class dev.dsf.fhir.dao.command.AbstractCommandWithResource
createReferencesHelper, getResourceTypeNameMethods inherited from class dev.dsf.fhir.dao.command.AbstractCommand
getIdentity, getIndex, getTransactionPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.dsf.fhir.dao.command.Command
getIdentity, getIndex, getResourceTypeName, getTransactionPriority
-
Field Details
-
responseGenerator
-
referenceCleaner
-
eventGenerator
-
createdResource
-
responseResult
protected jakarta.ws.rs.core.Response responseResult -
validationResult
protected ca.uhn.fhir.validation.ValidationResult validationResult
-
-
Constructor Details
-
CreateCommand
public CreateCommand(int index, Identity identity, PreferReturnType returnType, org.hl7.fhir.r4.model.Bundle bundle, org.hl7.fhir.r4.model.Bundle.BundleEntryComponent entry, String serverBase, AuthorizationHelper authorizationHelper, R resource, D dao, ExceptionHandler exceptionHandler, ParameterConverter parameterConverter, ResponseGenerator responseGenerator, ReferenceExtractor referenceExtractor, ReferenceResolver referenceResolver, ReferenceCleaner referenceCleaner, EventGenerator eventGenerator)
-
-
Method Details
-
preExecute
public void preExecute(Map<String, org.hl7.fhir.r4.model.IdType> idTranslationTable, Connection connection, ValidationHelper validationHelper, SnapshotGenerator snapshotGenerator) - Specified by:
preExecutein interfaceCommand
-
execute
public void execute(Map<String, org.hl7.fhir.r4.model.IdType> idTranslationTable, Connection connection, ValidationHelper validationHelper, SnapshotGenerator snapshotGenerator) throws SQLException, jakarta.ws.rs.WebApplicationException- Specified by:
executein interfaceCommand- Throws:
SQLExceptionjakarta.ws.rs.WebApplicationException
-
createWithTransactionAndId
protected R createWithTransactionAndId(Connection connection, R resource, UUID uuid) throws SQLException - Throws:
SQLException
-
postExecute
public Optional<org.hl7.fhir.r4.model.Bundle.BundleEntryComponent> postExecute(Connection connection, EventHandler eventHandler) - Specified by:
postExecutein interfaceCommand
-