This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes How to update using Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to update using Hibernate" Watch "How to update using Hibernate" New topic
Author

How to update using Hibernate

Thirumurugan Sivaji
Greenhorn

Joined: Mar 03, 2009
Posts: 20
Hi,

I have the following columns in my table.
Table name : EMPLOYEE
Column names in table EMPLOYEE are ID,EMP_ID,EMP_NAME,EMP_PWD

corresponding persistent java class in Employee.java
public class Employee implements Serializable{

private static final long serialVersionUID = 1L;
private int id;
private String empId;
private String empName;
private String empPwd;
public Employee(){}

/**
* @return the empId
*/
public String getEmpId() {
return empId;
}

/**
* @return the id
*/
public int getId() {
return id;
}

/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}

/**
* @param empId the empId to set
*/
public void setEmpId(String empId) {
this.empId = empId;
}

/**
* @return the empName
*/
public String getEmpName() {
return empName;
}

/**
* @param empName the empName to set
*/
public void setEmpName(String empName) {
this.empName = empName;
}

/**
* @return the empPwd
*/
public String getEmpPwd() {
return empPwd;
}

/**
* @param empPwd the empPwd to set
*/
public void setEmpPwd(String empPwd) {
this.empPwd = empPwd;
}


}

My question is How to update the password in table corresponding to given EmployeeID or Employee Name?.


Warm Regards,

Thirumurugan Sivaji

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to update using Hibernate