ejb源代码

源代码在线查看: user2.java

软件大小: 26 K
上传用户: dier1128
关键词: ejb 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.bjsxt.ejb.id;
				
				import java.io.Serializable;
				
				import javax.persistence.Entity;
				import javax.persistence.GeneratedValue;
				import javax.persistence.Id;
				import javax.persistence.Table;
				
				import org.hibernate.annotations.GenericGenerator;
				
				@Entity
				@Table(name="T_User2")
				public class User2 implements Serializable{
					
					/**
					 * 可以将ID的生成策略定义为UUID,这时候,ID的生成策略将跟hibernate绑定
					 */
					@Id
					@GeneratedValue(generator="hibernateuuidgenerator")
					@GenericGenerator(name="hibernateuuidgenerator",strategy="uuid")
					private String id;
					private String username;
					private String password;
					
					public String getPassword() {
						return password;
					}
					public void setPassword(String password) {
						this.password = password;
					}
					public String getUsername() {
						return username;
					}
					public void setUsername(String username) {
						this.username = username;
					}
					public String getId() {
						return id;
					}
					public void setId(String id) {
						this.id = id;
					}
				}
							

相关资源