001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.fhirgw.model; 011 012import org.hl7.fhir.instance.model.api.IBaseResource; 013 014public class CreateResponse extends BaseWriteResponse<CreateResponse> { 015 private IBaseResource myResource; 016 017 /** 018 * Constructor - Create an empty object 019 */ 020 public CreateResponse() { 021 super(); 022 } 023 024 /** 025 * Copy constructor - Creates a shallow copy only 026 */ 027 public CreateResponse(CreateResponse theCreateResponse) { 028 super(theCreateResponse); 029 myResource = theCreateResponse.getResource(); 030 } 031 032 public IBaseResource getResource() { 033 return myResource; 034 } 035 036 public void setResource(IBaseResource theResource) { 037 myResource = theResource; 038 } 039 040 /** 041 * Create a clone of this object using a <b>shallow copy only</b>. Values 042 * are copied by reference only, so things like Resources should only be 043 * modified if you are sure that the changes won't affect the value 044 * stored in cache. 045 */ 046 @Override 047 public CreateResponse clone() { 048 return new CreateResponse(this); 049 } 050}