Samples JDK
MessageTypeImpl.java
1 /*
2  * XML Type: MessageType
3  * Namespace: http://www.freemindcafe.com/purchase2
4  * Java type: com.freemindcafe.purchase2.MessageType
5  *
6  * Automatically generated - do not modify.
7  */
8 package com.freemindcafe.purchase2.impl;
9 /**
10  * An XML MessageType(@http://www.freemindcafe.com/purchase2).
11  *
12  * This is a complex type.
13  */
14 public class MessageTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.freemindcafe.purchase2.MessageType
15 {
16  private static final long serialVersionUID = 1L;
17 
18  public MessageTypeImpl(org.apache.xmlbeans.SchemaType sType)
19  {
20  super(sType);
21  }
22 
23  private static final javax.xml.namespace.QName GIFTWRAP$0 =
24  new javax.xml.namespace.QName("http://www.freemindcafe.com/purchase2", "giftWrap");
25  private static final javax.xml.namespace.QName COMMENT$2 =
26  new javax.xml.namespace.QName("http://www.freemindcafe.com/purchase2", "comment");
27 
28 
29  /**
30  * Gets the "giftWrap" element
31  */
32  public boolean getGiftWrap()
33  {
34  synchronized (monitor())
35  {
36  check_orphaned();
37  org.apache.xmlbeans.SimpleValue target = null;
38  target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GIFTWRAP$0, 0);
39  if (target == null)
40  {
41  return false;
42  }
43  return target.getBooleanValue();
44  }
45  }
46 
47  /**
48  * Gets (as xml) the "giftWrap" element
49  */
50  public org.apache.xmlbeans.XmlBoolean xgetGiftWrap()
51  {
52  synchronized (monitor())
53  {
54  check_orphaned();
55  org.apache.xmlbeans.XmlBoolean target = null;
56  target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(GIFTWRAP$0, 0);
57  return target;
58  }
59  }
60 
61  /**
62  * Sets the "giftWrap" element
63  */
64  public void setGiftWrap(boolean giftWrap)
65  {
66  synchronized (monitor())
67  {
68  check_orphaned();
69  org.apache.xmlbeans.SimpleValue target = null;
70  target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GIFTWRAP$0, 0);
71  if (target == null)
72  {
73  target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(GIFTWRAP$0);
74  }
75  target.setBooleanValue(giftWrap);
76  }
77  }
78 
79  /**
80  * Sets (as xml) the "giftWrap" element
81  */
82  public void xsetGiftWrap(org.apache.xmlbeans.XmlBoolean giftWrap)
83  {
84  synchronized (monitor())
85  {
86  check_orphaned();
87  org.apache.xmlbeans.XmlBoolean target = null;
88  target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(GIFTWRAP$0, 0);
89  if (target == null)
90  {
91  target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(GIFTWRAP$0);
92  }
93  target.set(giftWrap);
94  }
95  }
96 
97  /**
98  * Gets the "comment" element
99  */
100  public java.lang.String getComment()
101  {
102  synchronized (monitor())
103  {
104  check_orphaned();
105  org.apache.xmlbeans.SimpleValue target = null;
106  target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMENT$2, 0);
107  if (target == null)
108  {
109  return null;
110  }
111  return target.getStringValue();
112  }
113  }
114 
115  /**
116  * Gets (as xml) the "comment" element
117  */
118  public org.apache.xmlbeans.XmlString xgetComment()
119  {
120  synchronized (monitor())
121  {
122  check_orphaned();
123  org.apache.xmlbeans.XmlString target = null;
124  target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMENT$2, 0);
125  return target;
126  }
127  }
128 
129  /**
130  * True if has "comment" element
131  */
132  public boolean isSetComment()
133  {
134  synchronized (monitor())
135  {
136  check_orphaned();
137  return get_store().count_elements(COMMENT$2) != 0;
138  }
139  }
140 
141  /**
142  * Sets the "comment" element
143  */
144  public void setComment(java.lang.String comment)
145  {
146  synchronized (monitor())
147  {
148  check_orphaned();
149  org.apache.xmlbeans.SimpleValue target = null;
150  target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMENT$2, 0);
151  if (target == null)
152  {
153  target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(COMMENT$2);
154  }
155  target.setStringValue(comment);
156  }
157  }
158 
159  /**
160  * Sets (as xml) the "comment" element
161  */
162  public void xsetComment(org.apache.xmlbeans.XmlString comment)
163  {
164  synchronized (monitor())
165  {
166  check_orphaned();
167  org.apache.xmlbeans.XmlString target = null;
168  target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMENT$2, 0);
169  if (target == null)
170  {
171  target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(COMMENT$2);
172  }
173  target.set(comment);
174  }
175  }
176 
177  /**
178  * Unsets the "comment" element
179  */
180  public void unsetComment()
181  {
182  synchronized (monitor())
183  {
184  check_orphaned();
185  get_store().remove_element(COMMENT$2, 0);
186  }
187  }
188 }
void xsetGiftWrap(org.apache.xmlbeans.XmlBoolean giftWrap)
org.apache.xmlbeans.XmlBoolean xgetGiftWrap()
void xsetComment(org.apache.xmlbeans.XmlString comment)