|
Hibernate example source code file (User.java)
The Hibernate User.java source code/* * User.java * * Created on May 3, 2005, 9:42 AM */ package org.hibernate.test.orphan; import java.util.HashSet; import java.util.Set; /** * @author Kevin */ public class User { private Integer id; private String userid; private Set mail = new HashSet(); public User() { } public User(String userid) { this.userid = userid; } public Integer getId() { return id; } protected void setId(Integer id) { this.id = id; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public Set getMail() { return mail; } private void setMail(Set mail) { this.mail = mail; } public Mail addMail(String alias) { Mail mail = new Mail( alias, this ); getMail().add( mail ); return mail; } public void removeMail(Mail mail) { getMail().remove( mail ); } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate User.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.