View Javadoc

1   /*
2    * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
3    * the spring framework, http://el4j.sf.net
4    * Copyright (C) 2005 by ELCA Informatique SA, Av. de la Harpe 22-24,
5    * 1000 Lausanne, Switzerland, http://www.elca.ch
6    *
7    * EL4J is published under the GNU Lesser General Public License (LGPL)
8    * Version 2.1. See http://www.gnu.org/licenses/
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   * GNU Lesser General Public License for more details.
14   *
15   * For alternative licensing, please contact info@elca.ch
16   */
17  
18  package ch.elca.el4j.tests.remoting.jaxws.service;
19  
20  
21  import java.util.List;
22  import java.util.Set;
23  
24  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
25  
26  
27  /**
28   * This is a value object for test reason.
29   *
30   * <script type="text/javascript">printFileStatus
31   *   ("$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/tags/el4j_1_5_1/el4j/framework/tests/remoting_jaxws/jar-wsgen/src/main/java/ch/elca/el4j/tests/remoting/jaxws/service/CalculatorValueObject.java $",
32   *    "$Revision: 3038 $",
33   *    "$Date: 2008-06-09 12:08:34 +0200 (Mon, 09 Jun 2008) $",
34   *    "$Author: swismer $"
35   * );</script>
36   *
37   * ATTENTION: Do not rename elements using @XmlElement annotations!
38   *
39   * @author Martin Zeltner (MZE)
40   * @author Stefan Wismer (SWI)
41   */
42  public class CalculatorValueObject {
43  	/**
44  	 * Int test value.
45  	 */
46  	private int m_myInt;
47  
48  	/**
49  	 * Long test value.
50  	 */
51  	private long m_myLong;
52  	
53  	/**
54  	 * Double test value.
55  	 */
56  	private double m_myDouble;
57  	
58  	/**
59  	 * String test value.
60  	 */
61  	private String m_myString;
62  	
63  	/**
64  	 * Byte array test value.
65  	 */
66  	private byte[] m_myByteArray;
67  	
68  	/**
69  	 * String array test value.
70  	 */
71  	private String[] m_myStringArray;
72  	
73  	/**
74  	 * String array test value.
75  	 */
76  	private int[] m_myIntArray;
77  	
78  	/**
79  	 * A nested object.
80  	 */
81  	private SomeIntValue m_myNestedObject;
82  	
83  	/**
84  	 * A list of Integers.
85  	 */
86  	private List<Integer> m_myIntegerList;
87  	
88  	/**
89  	 * A set of Integers.
90  	 */
91  	private Set<Integer> m_myIntegerSet;
92  	
93  	// Map is not yet supported. Use list of tuples intead
94  	//private Map<Integer, Integer> m_myIntegerMap;
95  	
96  	// Neither multi-dimensional arrays nor nested collections like
97  	// List<List<...>> are supported.
98  	
99  	/**
100 	 * A two dimensional array.
101 	 *
102 	 * ATTENTION: Do not use {@link XmlJavaTypeAdapter} annotation here
103 	 * but on setter method, otherwise wsgen generates
104 	 * an additional element called m_myIntMatrix
105 	 */
106 	private int[][] m_myIntMatrix;
107 	
108 
109 	/**
110 	 * @return Returns the myByteArray.
111 	 */
112 	public byte[] getMyByteArray() {
113 		return m_myByteArray;
114 	}
115 
116 	/**
117 	 * @param myByteArray
118 	 *            The myByteArray to set.
119 	 */
120 	public void setMyByteArray(byte[] myByteArray) {
121 		m_myByteArray = myByteArray;
122 	}
123 
124 	/**
125 	 * @return Returns the myDouble.
126 	 */
127 	public double getMyDouble() {
128 		return m_myDouble;
129 	}
130 
131 	/**
132 	 * @param myDouble
133 	 *            The myDouble to set.
134 	 */
135 	public void setMyDouble(double myDouble) {
136 		m_myDouble = myDouble;
137 	}
138 
139 	/**
140 	 * @return Returns the myInt.
141 	 */
142 	public int getMyInt() {
143 		return m_myInt;
144 	}
145 
146 	/**
147 	 * @param myInt
148 	 *            The myInt to set.
149 	 */
150 	public void setMyInt(int myInt) {
151 		m_myInt = myInt;
152 	}
153 
154 	/**
155 	 * @return Returns the myLong.
156 	 */
157 	public long getMyLong() {
158 		return m_myLong;
159 	}
160 
161 	/**
162 	 * @param myLong
163 	 *            The myLong to set.
164 	 */
165 	public void setMyLong(long myLong) {
166 		m_myLong = myLong;
167 	}
168 
169 	/**
170 	 * @return Returns the myString.
171 	 */
172 	public String getMyString() {
173 		return m_myString;
174 	}
175 
176 	/**
177 	 * @param myString
178 	 *            The myString to set.
179 	 */
180 	public void setMyString(String myString) {
181 		m_myString = myString;
182 	}
183 	
184 	/**
185 	 * @return Returns myStringArray
186 	 */
187 	public String[] getMyStringArray() {
188 		return m_myStringArray;
189 	}
190 	
191 	/**
192 	 * @param myStringArray
193 	 *            The String array to set
194 	 */
195 	public void setMyStringArray(String[] myStringArray) {
196 		m_myStringArray = myStringArray;
197 	}
198 	
199 	/**
200 	 * @return Returns myIntArray
201 	 */
202 	public int[] getMyIntArray() {
203 		return m_myIntArray;
204 	}
205 	
206 	/**
207 	 * @param myIntArray
208 	 *            The int array to set
209 	 */
210 	public void setMyIntArray(int[] myIntArray) {
211 		m_myIntArray = myIntArray;
212 	}
213 	
214 	/**
215 	 * @return Returns myNestedObject
216 	 */
217 	public SomeIntValue getSomeValue() {
218 		return m_myNestedObject;
219 	}
220 	
221 	/**
222 	 * @param object
223 	 *             The SomeIntValueJaxws to set
224 	 */
225 	public void setSomeValue(SomeIntValue object) {
226 		m_myNestedObject = object;
227 	}
228 
229 	/**
230 	 * @return Returns myIntegerList.
231 	 */
232 	public List<Integer> getMyIntegerList() {
233 		return m_myIntegerList;
234 	}
235 
236 	/**
237 	 * @param myIntegerList The myIntegerList to set.
238 	 */
239 	public void setMyIntegerList(List<Integer> myIntegerList) {
240 		m_myIntegerList = myIntegerList;
241 	}
242 
243 	/**
244 	 * @return Returns  myIntegerSet.
245 	 */
246 	public Set<Integer> getMyIntegerSet() {
247 		return m_myIntegerSet;
248 	}
249 
250 	/**
251 	 * @param myIntegerSet The myIntegerSet to set.
252 	 */
253 	public void setMyIntegerSet(Set<Integer> myIntegerSet) {
254 		m_myIntegerSet = myIntegerSet;
255 	}
256 
257 	/**
258 	 * @return Returns the myIntMatrix.
259 	 *
260 	 * ATTENTION: strange: {@link XmlJavaTypeAdapter} is not accepted here
261 	 */
262 	public int[][] getMyIntMatrix() {
263 		return m_myIntMatrix;
264 	}
265 
266 	/**
267 	 * @param myIntMatrix Is the myIntMatrix to set.
268 	 */
269 	@XmlJavaTypeAdapter(type = int[][].class, value = IntMatrixAdapter.class)
270 	public void setMyIntMatrix(int[][] myIntMatrix) {
271 		m_myIntMatrix = myIntMatrix;
272 	}
273 }