View Javadoc
1 /* 2 * An XML document type. 3 * Localname: amount 4 * Namespace: http://mrl.sf.net 5 * Java type: net.sf.mrl.AmountDocument 6 * 7 * Automatically generated - do not modify. 8 */ 9 package net.sf.mrl.impl; 10 /*** 11 * A document containing one amount(@http://mrl.sf.net) element. 12 * 13 * This is a complex type. 14 */ 15 public class AmountDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.sf.mrl.AmountDocument 16 { 17 18 public AmountDocumentImpl(org.apache.xmlbeans.SchemaType sType) 19 { 20 super(sType); 21 } 22 23 private static final javax.xml.namespace.QName AMOUNT$0 = 24 new javax.xml.namespace.QName("http://mrl.sf.net", "amount"); 25 26 27 /*** 28 * Gets the "amount" element 29 */ 30 public net.sf.mrl.AmountDocument.Amount getAmount() 31 { 32 synchronized (monitor()) 33 { 34 check_orphaned(); 35 net.sf.mrl.AmountDocument.Amount target = null; 36 target = (net.sf.mrl.AmountDocument.Amount)get_store().find_element_user(AMOUNT$0, 0); 37 if (target == null) 38 { 39 return null; 40 } 41 return target; 42 } 43 } 44 45 /*** 46 * Sets the "amount" element 47 */ 48 public void setAmount(net.sf.mrl.AmountDocument.Amount amount) 49 { 50 synchronized (monitor()) 51 { 52 check_orphaned(); 53 net.sf.mrl.AmountDocument.Amount target = null; 54 target = (net.sf.mrl.AmountDocument.Amount)get_store().find_element_user(AMOUNT$0, 0); 55 if (target == null) 56 { 57 target = (net.sf.mrl.AmountDocument.Amount)get_store().add_element_user(AMOUNT$0); 58 } 59 target.set(amount); 60 } 61 } 62 63 /*** 64 * Appends and returns a new empty "amount" element 65 */ 66 public net.sf.mrl.AmountDocument.Amount addNewAmount() 67 { 68 synchronized (monitor()) 69 { 70 check_orphaned(); 71 net.sf.mrl.AmountDocument.Amount target; 72 target = (net.sf.mrl.AmountDocument.Amount)get_store().add_element_user(AMOUNT$0); 73 return target; 74 } 75 } 76 /*** 77 * An XML amount(@http://mrl.sf.net). 78 * 79 * This is an atomic type that is a restriction of org.apache.xmlbeans.XmlDecimal. 80 */ 81 public static class AmountImpl extends org.apache.xmlbeans.impl.values.JavaDecimalHolderEx implements net.sf.mrl.AmountDocument.Amount 82 { 83 84 public AmountImpl(org.apache.xmlbeans.SchemaType sType) 85 { 86 super(sType, true); 87 } 88 89 protected AmountImpl(org.apache.xmlbeans.SchemaType sType, boolean b) 90 { 91 super(sType, b); 92 } 93 94 private static final javax.xml.namespace.QName UNIT$0 = 95 new javax.xml.namespace.QName("", "unit"); 96 97 98 /*** 99 * Gets the "unit" attribute 100 */ 101 public java.lang.String getUnit() 102 { 103 synchronized (monitor()) 104 { 105 check_orphaned(); 106 org.apache.xmlbeans.SimpleValue target = null; 107 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UNIT$0); 108 if (target == null) 109 { 110 return null; 111 } 112 return target.getStringValue(); 113 } 114 } 115 116 /*** 117 * Gets (as xml) the "unit" attribute 118 */ 119 public org.apache.xmlbeans.XmlString xgetUnit() 120 { 121 synchronized (monitor()) 122 { 123 check_orphaned(); 124 org.apache.xmlbeans.XmlString target = null; 125 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(UNIT$0); 126 return target; 127 } 128 } 129 130 /*** 131 * True if has "unit" attribute 132 */ 133 public boolean isSetUnit() 134 { 135 synchronized (monitor()) 136 { 137 check_orphaned(); 138 return get_store().find_attribute_user(UNIT$0) != null; 139 } 140 } 141 142 /*** 143 * Sets the "unit" attribute 144 */ 145 public void setUnit(java.lang.String unit) 146 { 147 synchronized (monitor()) 148 { 149 check_orphaned(); 150 org.apache.xmlbeans.SimpleValue target = null; 151 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UNIT$0); 152 if (target == null) 153 { 154 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(UNIT$0); 155 } 156 target.setStringValue(unit); 157 } 158 } 159 160 /*** 161 * Sets (as xml) the "unit" attribute 162 */ 163 public void xsetUnit(org.apache.xmlbeans.XmlString unit) 164 { 165 synchronized (monitor()) 166 { 167 check_orphaned(); 168 org.apache.xmlbeans.XmlString target = null; 169 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(UNIT$0); 170 if (target == null) 171 { 172 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(UNIT$0); 173 } 174 target.set(unit); 175 } 176 } 177 178 /*** 179 * Unsets the "unit" attribute 180 */ 181 public void unsetUnit() 182 { 183 synchronized (monitor()) 184 { 185 check_orphaned(); 186 get_store().remove_attribute(UNIT$0); 187 } 188 } 189 } 190 }

This page was automatically generated by Maven