@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("value")) { this.value = castToDecimal(value); // DecimalType } else if (name.equals("comparator")) { value = new QuantityComparatorEnumFactory().fromType(castToCode(value)); this.comparator = (Enumeration) value; // Enumeration<QuantityComparator> } else if (name.equals("unit")) { this.unit = castToString(value); // StringType } else if (name.equals("system")) { this.system = castToUri(value); // UriType } else if (name.equals("code")) { this.code = castToCode(value); // CodeType } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 111972721: // value this.value = castToDecimal(value); // DecimalType return value; case -844673834: // comparator value = new QuantityComparatorEnumFactory().fromType(castToCode(value)); this.comparator = (Enumeration) value; // Enumeration<QuantityComparator> return value; case 3594628: // unit this.unit = castToString(value); // StringType return value; case -887328209: // system this.system = castToUri(value); // UriType return value; case 3059181: // code this.code = castToCode(value); // CodeType return value; default: return super.setProperty(hash, name, value); } }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("value")) { this.value = castToDecimal(value); // DecimalType } else if (name.equals("comparator")) { value = new QuantityComparatorEnumFactory().fromType(castToCode(value)); this.comparator = (Enumeration) value; // Enumeration<QuantityComparator> } else if (name.equals("unit")) { this.unit = castToString(value); // StringType } else if (name.equals("system")) { this.system = castToUri(value); // UriType } else if (name.equals("code")) { this.code = castToCode(value); // CodeType } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 111972721: // value this.value = castToDecimal(value); // DecimalType return value; case -844673834: // comparator value = new QuantityComparatorEnumFactory().fromType(castToCode(value)); this.comparator = (Enumeration) value; // Enumeration<QuantityComparator> return value; case 3594628: // unit this.unit = castToString(value); // StringType return value; case -887328209: // system this.system = castToUri(value); // UriType return value; case 3059181: // code this.code = castToCode(value); // CodeType return value; default: return super.setProperty(hash, name, value); } }