001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019: package org.apache.openjpa.persistence.fetchgroups;
020:
021: import javax.persistence.Basic;
022: import javax.persistence.Entity;
023: import javax.persistence.Id;
024:
025: @Entity
026: public class FGAddress {
027: @Id
028: private int id;
029:
030: @Basic
031: private String street;
032:
033: @Basic
034: private String city;
035:
036: @Basic
037: private String state;
038:
039: @Basic
040: private int zip;
041:
042: public FGAddress() {
043:
044: }
045:
046: public FGAddress(int id, String street, String city, String state,
047: int zip) {
048: this .id = id;
049: this .street = street;
050: this .city = city;
051: this .state = state;
052: this .zip = zip;
053: }
054:
055: public String getCity() {
056: return city;
057: }
058:
059: public void setCity(String city) {
060: this .city = city;
061: }
062:
063: public int getId() {
064: return id;
065: }
066:
067: public void setId(int id) {
068: this .id = id;
069: }
070:
071: public String getState() {
072: return state;
073: }
074:
075: public void setState(String state) {
076: this .state = state;
077: }
078:
079: public String getStreet() {
080: return street;
081: }
082:
083: public void setStreet(String street) {
084: this .street = street;
085: }
086:
087: public int getZip() {
088: return zip;
089: }
090:
091: public void setZip(int zip) {
092: this .zip = zip;
093: }
094:
095: public String toString() {
096: StringBuffer sb = new StringBuffer();
097: sb.append("FGAddress(id=").append(this .id).append(")");
098: sb.append(": street=").append(getStreet());
099: sb.append(": city=").append(getCity());
100: sb.append(": state=").append(getState());
101: sb.append(": zip=").append(getZip());
102:
103: return new String(sb);
104: }
105:
106: }
|