001package ca.cdr.api.fhirgw.model;
002
003import ca.uhn.fhir.rest.param.DateRangeParam;
004import org.hl7.fhir.instance.model.api.IIdType;
005
006import java.util.Date;
007
008/**
009 * This class represents a FHIR Gateway History request
010 */
011public class HistoryRequest extends BaseRequest<HistoryRequest> {
012        private Integer myOffset;
013        private IIdType myId;
014        private Date myDateSince;
015        private DateRangeParam myDateAt;
016
017        public HistoryRequest() {}
018
019        /**
020         * Copy constructor
021         */
022        public HistoryRequest(HistoryRequest theRequest) {
023                super(theRequest);
024                myOffset = theRequest.getOffset();
025                myId = theRequest.getId();
026                myDateSince = theRequest.getDateSince();
027                myDateAt = theRequest.getDateAt();
028        }
029
030        /**
031         *
032         * @param theOffset Used to indicate the starting position of the queried results
033         */
034        public void setOffSet(Integer theOffset) {
035                myOffset = theOffset;
036        }
037
038        /**
039         *
040         * @param theId Used to set the ID of the specified resource
041         */
042        public void setId(IIdType theId) {
043                myId = theId;
044        }
045
046        /**
047         * @param theDateSince Used to include resource versions that were created at or after the specified date
048         */
049        public void setDateSince(Date theDateSince) {
050                myDateSince = theDateSince;
051        }
052
053        /**
054         * @param theDateAt Used to include resource versions that were created at the specified date
055         */
056        public void setDateAt(DateRangeParam theDateAt) {
057                myDateAt = theDateAt;
058        }
059
060        public IIdType getId() {
061                return myId;
062        }
063
064        public Integer getOffset() {
065                return myOffset;
066        }
067
068        public Date getDateSince() {
069                return myDateSince;
070        }
071
072        public DateRangeParam getDateAt() {
073                return myDateAt;
074        }
075}