介绍了hibernate的入门有一些基本常用的事例

源代码在线查看: person.java

软件大小: 17462 K
上传用户: qingmei_changle
关键词: hibernate
下载地址: 免注册下载 普通下载 VIP

相关代码

				//$Id: Person.java,v 1.2 2005/02/12 07:27:29 steveebersole Exp $				package org.hibernate.test.onetooneformula;								import java.io.Serializable;								/**				 * @author Gavin King				 */				public class Person implements Serializable {					private String name;					private Address address;					private Address mailingAddress;										public Address getAddress() {						return address;					}					public void setAddress(Address address) {						this.address = address;					}					public Address getMailingAddress() {						return mailingAddress;					}					public void setMailingAddress(Address mailingAddress) {						this.mailingAddress = mailingAddress;					}					public String getName() {						return name;					}					public void setName(String name) {						this.name = name;					}									public boolean equals(Object that) {						if ( !(that instanceof Person) ) return false;						Person person = (Person) that;						return person.getName().equals(name);					}										public int hashCode() {						return name.hashCode();					}				}							

相关资源