/******************************************************************************* | |
* Copyright (c) 1998, 2008 Oracle. 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: | |
* bdoughan - JPA DAS INCUBATOR - Enhancement 258057 | |
* http://wiki.eclipse.org/EclipseLink/Development/SDO-JPA | |
* | |
* This code is being developed under INCUBATION and is not currently included | |
* in the automated EclipseLink build. The API in this code may change, or | |
* may never be included in the product. Please provide feedback through mailing | |
* lists or the bug database. | |
******************************************************************************/ | |
package com.example.customer; | |
import javax.persistence.*; | |
import static javax.persistence.CascadeType.ALL; | |
@Entity | |
public class PhoneNumber { | |
@Id | |
private int id; | |
private String type; | |
@Column(name="num") | |
private String number; | |
@ManyToOne(cascade=ALL) | |
private Customer customer; | |
public PhoneNumber() { | |
} | |
public int getId() { | |
return id; | |
} | |
public void setId(int id) { | |
this.id = id; | |
} | |
public String getType() { | |
return type; | |
} | |
public void setType(String type) { | |
this.type = type; | |
} | |
public String getNumber() { | |
return number; | |
} | |
public void setNumber(String number) { | |
this.number = number; | |
} | |
public Customer getCustomer() { | |
return customer; | |
} | |
public void setCustomer(Customer customer) { | |
this.customer = customer; | |
} | |
} |