View Javadoc
1   package generated.model.de.fhdw.partner;
2   
3   import de.fhdw.wtf.context.model.Int;
4   import de.fhdw.wtf.context.model.Str;
5   import de.fhdw.wtf.persistence.meta.UserObject;
6   
7   /**
8    * Represents a post office box.
9    */
10  public class Postfach extends Kommunikationskanal {
11  	
12  	/**
13  	 * The city containing the post office box.
14  	 */
15  	private Str stadt;
16  	/**
17  	 * The number of the post office box.
18  	 */
19  	private Int nr;
20  	
21  	/**
22  	 * Creates a Postfach object.
23  	 * 
24  	 * @param stadt
25  	 *            The city containing the post office box.
26  	 * @param nr
27  	 *            The number of the post office box.
28  	 */
29  	public Postfach(final Str stadt, final Int nr) {
30  		super();
31  		this.stadt = stadt;
32  		this.nr = nr;
33  	}
34  	
35  	/**
36  	 * Loads object from database.
37  	 * 
38  	 * @param userObject
39  	 *            The underlying user object.
40  	 */
41  	public Postfach(final UserObject userObject) {
42  		super(userObject);
43  	}
44  	
45  	@Override
46  	public String toString() {
47  		return this.nr.toString() + " " + this.stadt.toString();
48  	}
49  }