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