001/*
002 * #%L
003 * HAPI FHIR Structures - DSTU2 (FHIR v1.0.0)
004 * %%
005 * Copyright (C) 2014 - 2023 Smile CDR, Inc.
006 * %%
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 * #L%
019 */
020package ca.uhn.fhir.model.dstu2.composite;
021
022import ca.uhn.fhir.model.api.annotation.DatatypeDef;
023import ca.uhn.fhir.model.api.annotation.SimpleSetter;
024import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
025import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum;
026
027@DatatypeDef(name="SimpleQuantity", profileOf=QuantityDt.class) 
028public class SimpleQuantityDt extends QuantityDt {
029
030        private static final long serialVersionUID = 1L;
031
032        /**
033         * Constructor
034         */
035        public SimpleQuantityDt() {
036                // nothing
037        }
038
039 
040        /**
041         * Constructor
042         */
043        @SimpleSetter
044        public SimpleQuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
045                setValue(theValue);
046        }
047
048        /**
049         * Constructor
050         */
051        @SimpleSetter
052        public SimpleQuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
053                setValue(theValue);
054        }
055        
056        /**
057         * Constructor
058         */
059        @SimpleSetter
060        public SimpleQuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue,
061                        @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
062                setValue(theValue);
063                setComparator(theComparator);
064                setUnit(theUnits);
065        }
066
067        /**
068         * Constructor
069         */
070        @SimpleSetter
071        public SimpleQuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityComparatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue,
072                        @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
073                setValue(theValue);
074                setComparator(theComparator);
075                setUnit(theUnits);
076        }
077
078        /**
079         * Constructor
080         */
081        @SimpleSetter
082        public SimpleQuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
083                setValue(theValue);
084                setSystem(theSystem);
085                setUnit(theUnits);
086        }
087
088        /**
089         * Constructor
090         */
091        @SimpleSetter
092        public SimpleQuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
093                setValue(theValue);
094                setSystem(theSystem);
095                setUnit(theUnits);
096        }
097
098}