// Path: Server/src/com/hufeiya/entity/User.java
// public class User implements java.io.Serializable {
// 
// 	// Fields
// 
// 	private Integer uid;
// 	private String username;
// 	private String pass;
// 	private String userNo;
// 	private String phone;
// 	private Boolean userType;
// 	private Set studentSheets = new HashSet(0);
// 	private Set courses = new HashSet(0);
// 
// 	// Constructors
// 
// 	/** default constructor */
// 	public User() {
// 	}
// 
// 	/** full constructor */
// 	public User(String username, String pass, String userNo, String phone,
// 			Boolean userType, Set studentSheets, Set courses) {
// 		this.username = username;
// 		this.pass = pass;
// 		this.userNo = userNo;
// 		this.phone = phone;
// 		this.userType = userType;
// 		this.studentSheets = studentSheets;
// 		this.courses = courses;
// 	}
// 	
// 	/**Login constructor*/
// 	public User(String phone,String pass){
// 		this.phone = phone;
// 		this.pass = pass;
// 	}
// 	// Property accessors
// 
// 	public Integer getUid() {
// 		return this.uid;
// 	}
// 
// 	public void setUid(Integer uid) {
// 		this.uid = uid;
// 	}
// 
// 	public String getUsername() {
// 		return this.username;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public String getPass() {
// 		return this.pass;
// 	}
// 
// 	public void setPass(String pass) {
// 		this.pass = pass;
// 	}
// 
// 	public String getUserNo() {
// 		return this.userNo;
// 	}
// 
// 	public void setUserNo(String userNo) {
// 		this.userNo = userNo;
// 	}
// 
// 	public String getPhone() {
// 		return this.phone;
// 	}
// 
// 	public void setPhone(String phone) {
// 		this.phone = phone;
// 	}
// 
// 	public Boolean getUserType() {
// 		return this.userType;
// 	}
// 
// 	public void setUserType(Boolean userType) {
// 		this.userType = userType;
// 	}
// 
// 	public Set getStudentSheets() {
// 		return this.studentSheets;
// 	}
// 
// 	public void setStudentSheets(Set studentSheets) {
// 		this.studentSheets = studentSheets;
// 	}
// 
// 	public Set getCourses() {
// 		return this.courses;
// 	}
// 
// 	public void setCourses(Set courses) {
// 		this.courses = courses;
// 	}
// 
// }


import java.util.List;
import java.util.Set;
import org.hibernate.LockOptions;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hufeiya.entity.User;
package com.hufeiya.DAO;




/**
 * A data access object (DAO) providing persistence and search support for User
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.hufeiya.DAO.User
 * @author MyEclipse Persistence Tools
 */
public class UserDAO extends BaseHibernateDAO {
	private static final Logger log = LoggerFactory.getLogger(UserDAO.class);
	// property constants
	public static final String USERNAME = "username";
	public static final String PASS = "pass";
	public static final String USER_NO = "userNo";
	public static final String PHONE = "phone";
	public static final String USER_TYPE = "userType";

// Path: Server/src/com/hufeiya/entity/User.java
// public class User implements java.io.Serializable {
// 
// 	// Fields
// 
// 	private Integer uid;
// 	private String username;
// 	private String pass;
// 	private String userNo;
// 	private String phone;
// 	private Boolean userType;
// 	private Set studentSheets = new HashSet(0);
// 	private Set courses = new HashSet(0);
// 
// 	// Constructors
// 
// 	/** default constructor */
// 	public User() {
// 	}
// 
// 	/** full constructor */
// 	public User(String username, String pass, String userNo, String phone,
// 			Boolean userType, Set studentSheets, Set courses) {
// 		this.username = username;
// 		this.pass = pass;
// 		this.userNo = userNo;
// 		this.phone = phone;
// 		this.userType = userType;
// 		this.studentSheets = studentSheets;
// 		this.courses = courses;
// 	}
// 	
// 	/**Login constructor*/
// 	public User(String phone,String pass){
// 		this.phone = phone;
// 		this.pass = pass;
// 	}
// 	// Property accessors
// 
// 	public Integer getUid() {
// 		return this.uid;
// 	}
// 
// 	public void setUid(Integer uid) {
// 		this.uid = uid;
// 	}
// 
// 	public String getUsername() {
// 		return this.username;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public String getPass() {
// 		return this.pass;
// 	}
// 
// 	public void setPass(String pass) {
// 		this.pass = pass;
// 	}
// 
// 	public String getUserNo() {
// 		return this.userNo;
// 	}
// 
// 	public void setUserNo(String userNo) {
// 		this.userNo = userNo;
// 	}
// 
// 	public String getPhone() {
// 		return this.phone;
// 	}
// 
// 	public void setPhone(String phone) {
// 		this.phone = phone;
// 	}
// 
// 	public Boolean getUserType() {
// 		return this.userType;
// 	}
// 
// 	public void setUserType(Boolean userType) {
// 		this.userType = userType;
// 	}
// 
// 	public Set getStudentSheets() {
// 		return this.studentSheets;
// 	}
// 
// 	public void setStudentSheets(Set studentSheets) {
// 		this.studentSheets = studentSheets;
// 	}
// 
// 	public Set getCourses() {
// 		return this.courses;
// 	}
// 
// 	public void setCourses(Set courses) {
// 		this.courses = courses;
// 	}
// 
// }


// Path: Server/src/com/hufeiya/DAO/UserDAO.java
import java.util.List;
import java.util.Set;
import org.hibernate.LockOptions;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hufeiya.entity.User;

package com.hufeiya.DAO;




/**
 * A data access object (DAO) providing persistence and search support for User
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.hufeiya.DAO.User
 * @author MyEclipse Persistence Tools
 */
public class UserDAO extends BaseHibernateDAO {
	private static final Logger log = LoggerFactory.getLogger(UserDAO.class);
	// property constants
	public static final String USERNAME = "username";
	public static final String PASS = "pass";
	public static final String USER_NO = "userNo";
	public static final String PHONE = "phone";
	public static final String USER_TYPE = "userType";

	public void save(User transientInstance) {