| /******************************************************************************* |
| * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 |
| * which accompanies this distribution. |
| * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html |
| * and the Eclipse Distribution License is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * Contributors: |
| * dclarke - initial JPA Employee example using XML (bug 217884) |
| * mbraeuer - annotated version |
| ******************************************************************************/ |
| package model; |
| |
| import java.io.Serializable; |
| import javax.persistence.*; |
| |
| /** |
| * Simple Address class with Basic mappings. |
| * It uses a generated Id. |
| */ |
| @Entity |
| @Table(name="BF_ADDRESS") |
| public class Address implements Serializable { |
| @Id |
| @Column(name = "ADDRESS_ID") |
| @GeneratedValue(strategy = GenerationType.SEQUENCE) |
| private long id; |
| @Basic |
| private String city; |
| @Basic |
| private String country; |
| @Basic |
| private String province; |
| @Basic |
| @Column(name = "P_CODE") |
| private String postalCode; |
| @Basic |
| private String street; |
| |
| public Address() { |
| } |
| |
| public long getId() { |
| return this.id; |
| } |
| |
| public void setId(long addressId) { |
| this.id = addressId; |
| } |
| |
| public String getCity() { |
| return city; |
| } |
| |
| public void setCity(String city) { |
| this.city = city; |
| } |
| |
| public String getCountry() { |
| return country; |
| } |
| |
| public void setCountry(String country) { |
| this.country = country; |
| } |
| |
| public String getProvince() { |
| return province; |
| } |
| |
| public void setProvince(String province) { |
| this.province = province; |
| } |
| |
| public String getPostalCode() { |
| return this.postalCode; |
| } |
| |
| public void setPostalCode(String postalCode) { |
| this.postalCode = postalCode; |
| } |
| |
| public String getStreet() { |
| return street; |
| } |
| |
| public void setStreet(String street) { |
| this.street = street; |
| } |
| } |