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

源代码在线查看: group.java

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

相关代码

				// $Id: Group.java,v 1.1 2004/11/11 20:56:43 steveebersole Exp $				package org.hibernate.test.exception;								import java.util.Set;								/**				 * Implementation of Group.				 *				 * @author Steve Ebersole				 */				public class Group {					private Long id;					private String name;					private Set members;									public Long getId() {						return id;					}									public void setId(Long id) {						this.id = id;					}									public String getName() {						return name;					}									public void setName(String name) {						this.name = name;					}									public Set getMembers() {						return members;					}									public void setMembers(Set members) {						this.members = members;					}									public void addMember(User member) {						if (member == null) {							throw new IllegalArgumentException("Member to add cannot be null");						}										this.members.add(member);						member.getMemberships().add(this);					}				}							

相关资源