View Javadoc
1   /*
2    * Copyright 2002-2007 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.springframework.tests.sample.beans;
18  
19  import java.io.IOException;
20  
21  /**
22   * Interface used for {@link org.springframework.tests.sample.beans.TestBean}.
23   *
24   * <p>Two methods are the same as on Person, but if this
25   * extends person it breaks quite a few tests..
26   *
27   * @author Rod Johnson
28   * @author Juergen Hoeller
29   */
30  public interface ITestBean {
31  
32  	int getAge();
33  
34  	void setAge(int age);
35  
36  	String getName();
37  
38  	void setName(String name);
39  
40  	ITestBean getSpouse();
41  
42  	void setSpouse(ITestBean spouse);
43  
44  	ITestBean[] getSpouses();
45  
46  	String[] getStringArray();
47  
48  	void setStringArray(String[] stringArray);
49  
50  	Integer[][] getNestedIntegerArray();
51  
52  	Integer[] getSomeIntegerArray();
53  
54  	void setSomeIntegerArray(Integer[] someIntegerArray);
55  
56  	void setNestedIntegerArray(Integer[][] nestedIntegerArray);
57  
58  	int[] getSomeIntArray();
59  
60  	void setSomeIntArray(int[] someIntArray);
61  
62  	int[][] getNestedIntArray();
63  
64  	void setNestedIntArray(int[][] someNestedArray);
65  
66  	/**
67  	 * Throws a given (non-null) exception.
68  	 */
69  	void exceptional(Throwable t) throws Throwable;
70  
71  	Object returnsThis();
72  
73  	INestedTestBean getDoctor();
74  
75  	INestedTestBean getLawyer();
76  
77  	IndexedTestBean getNestedIndexedBean();
78  
79  	/**
80  	 * Increment the age by one.
81  	 * @return the previous age
82  	 */
83  	int haveBirthday();
84  
85  	void unreliableFileOperation() throws IOException;
86  
87  }