Wednesday, December 16, 2009

phoneNumber

package edu.byui.examples;

import javax.persistence.Entity;

import javax.persistence.GeneratedValue;

import javax.persistence.Id;

import javax.persistence.Table;

@Entity

@Table(name = "phone_number")

public class PhoneNumber {

@Id

@GeneratedValue

private Integer id;

private String phone;

public String getPhone() {

return phone;

}

public void setPhone(String phone) {

this.phone = phone;

}

}

/*

* The purpose of this class is to show how some of the abilities of Hibernate

* are used. Covered in this example application are adding records to tables,

* modifying records in tables, removing records from tables, and

* using a Many-To-Many relationship between tables.

*/

No comments:

Post a Comment