1   package ch.ige.edossier.web.vo;
2   
3   import java.io.Serializable;
4   import java.sql.Date;
5   
6   /**
7    * B32.03 - eDossier-Interceptions - Diplomarbeit an der Software-Schule Schweiz<br>
8    * Value-Object: Kapselt die Daten der Tabelle ADDRESS
9    * <p>
10   * Copyright (c) 2004, Eidgenössisches Institut für Geistiges Eigentum
11   * @author    Anita Rueegsegger, Marc Bouquet
12   * @version   $Id: AddressVO.java,v 1.6 2004/10/22 01:58:20 bouquet Exp $
13   */
14  public class AddressVO implements Serializable
15  {
16    private int addressId = 0;
17    private int roleId = 0;
18    private int dossierId = 0;
19    private String name = null;
20    private String address = null;
21    private String city = null;
22    private String countryCd = null;
23    private Date createdDat = null;
24    private Date changedDat = null;
25  
26    /**
27     * Gibt den Inhalt des ValueObject AddressVO zurück
28     * @return Inhalt von AddressVO
29     */
30    public String toString()
31    {
32      StringBuffer buf = new StringBuffer();
33  
34      buf.append( " addressId       = <" + this.addressId + ">\n" );
35      buf.append( " roleId          = <" + this.roleId + ">\n" );
36      buf.append( " dossierId       = <" + this.dossierId + ">\n" );
37      buf.append( " name            = <" + this.name + ">\n" );
38      buf.append( " address         = <" + this.address + ">\n" );
39      buf.append( " city            = <" + this.city + ">\n" );
40      buf.append( " countryCd       = <" + this.countryCd + ">\n" );
41      buf.append( " createdDat      = <" + this.createdDat + "> \n" );
42      buf.append( " changedDat      = <" + this.changedDat + "> \n" );
43  
44      return buf.toString();
45    }
46  
47    /**
48     * Gibt die Adresse als formatierte Adresse zurück.
49     * @return String adresse
50     */
51    public String getFormatAddress()
52    {
53      StringBuffer buf = new StringBuffer();
54      buf.append( name );
55      buf.append( "<br>" );
56      buf.append( address );
57      buf.append( "<br>" );
58      buf.append( countryCd );
59      buf.append( " - " );
60      buf.append( city );
61      return buf.toString();
62    }
63  
64    /*******************************************************************************************************************
65       G E T T E R - / S E T T E R - M E T H O D E N
66     *******************************************************************************************************************/
67  
68    public int getAddressId()
69    {
70      return addressId;
71    }
72  
73    public void setAddressId( int addressId )
74    {
75      this.addressId = addressId;
76    }
77  
78    public String getName()
79    {
80      return name;
81    }
82  
83    public void setName( String name )
84    {
85      this.name = name;
86    }
87  
88    public String getAddress()
89    {
90      return address;
91    }
92  
93    public void setAddress( String address )
94    {
95      this.address = address;
96    }
97  
98    public String getCity()
99    {
100     return city;
101   }
102 
103   public void setCity( String city )
104   {
105     this.city = city;
106   }
107 
108   public String getCountryCd()
109   {
110     return countryCd;
111   }
112 
113   public void setCountryCd( String countryCd )
114   {
115     this.countryCd = countryCd;
116   }
117 
118   public Date getCreatedDat()
119   {
120     return createdDat;
121   }
122 
123   public Date getChangedDat()
124   {
125     return changedDat;
126   }
127 
128   public void setChangedDat( Date changedDat )
129   {
130     this.changedDat = changedDat;
131   }
132 
133   public void setCreatedDat( Date createdDat )
134   {
135     this.createdDat = createdDat;
136   }
137 
138   public int getRoleId()
139   {
140     return roleId;
141   }
142 
143   public void setRoleId( int roleId )
144   {
145     this.roleId = roleId;
146   }
147 
148   public int getDossierId()
149   {
150     return dossierId;
151   }
152 
153   public void setDossierId( int dossierId )
154   {
155     this.dossierId = dossierId;
156   }
157 }
158