1   /*
2    * Copyright 2006-2009 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  package net.sourceforge.domian.test.domain;
17  
18  /**
19   * THE arch-value-object.
20   * (final classes not allowed for openJPA non-enhanced embeddable classes.)
21   */
22  public class Address {
23  
24      private String addressLine1;
25      private String addressLine2;
26      private String zip;
27      private String city;
28      private String state;
29      private String country;
30  
31      /** Mandatory JPA constructor (for non-enhanced embeddable classes). */
32      protected Address() {}
33  
34      /** Constructor for mandatory members. */
35      public Address(final String addressLine1,
36                     final String zip,
37                     final String city) {
38          this(addressLine1, null, zip, city, null, null);
39      }
40  
41      /** Constructor with complete member settings. */
42      public Address(final String addressLine1,
43                     final String addressLine2,
44                     final String zip,
45                     final String city,
46                     final String state,
47                     final String country) {
48          this.addressLine1 = addressLine1;
49          this.addressLine2 = addressLine2;
50          this.zip = zip;
51          this.city = city;
52          this.state = state;
53          this.country = country;
54      }
55  
56      public String getAddressLine1() {
57          return addressLine1;
58      }
59  
60      public void setAddressLine1(String addressLine1) {
61          this.addressLine1 = addressLine1;
62      }
63  
64      public String getAddressLine2() {
65          return addressLine2;
66      }
67  
68      public void setAddressLine2(String addressLine2) {
69          this.addressLine2 = addressLine2;
70      }
71  
72      public String getZip() {
73          return zip;
74      }
75  
76      public void setZip(String zip) {
77          this.zip = zip;
78      }
79  
80      public String getCity() {
81          return city;
82      }
83  
84      public void setCity(String city) {
85          this.city = city;
86      }
87  
88      public String getState() {
89          return state;
90      }
91  
92      public void setState(String state) {
93          this.state = state;
94      }
95  
96      public String getCountry() {
97          return country;
98      }
99  
100     public void setCountry(String country) {
101         this.country = country;
102     }
103 }