Created
June 1, 2010 16:53
-
-
Save dbonillaf/421151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.six.model.entity; | |
import javax.persistence.*; | |
@Entity | |
@Table(name="ORDER_TABLE") | |
public class Order { | |
private int id; | |
private String address; | |
private Customer customer; | |
@Id | |
@Column(name="ORDER_ID") | |
public int getId() { | |
return id; | |
} | |
public void setId(int id) { | |
this.id = id; | |
} | |
@Column(name="SHIPPING_ADDRESS") | |
public String getAddress() { | |
return address; | |
} | |
public void setAddress(String address) { | |
this.address = address; | |
} | |
@ManyToOne() | |
@JoinColumn(name="CUSTOMER_ID") | |
public Customer getCustomer() { | |
return customer; | |
} | |
public void setCustomer(Customer customer) { | |
this.customer = customer; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment