0% found this document useful (0 votes)
14 views

Hibernate&struts 2

This Java class defines data access object (DAO) methods for a User entity. It extends a GenericDao class and provides methods to add, remove, and update a User object by calling corresponding save, remove, and update methods from the parent class. These DAO methods allow performing CRUD operations on User data stored in a database using Hibernate.

Uploaded by

Fabiano Farah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Hibernate&struts 2

This Java class defines data access object (DAO) methods for a User entity. It extends a GenericDao class and provides methods to add, remove, and update a User object by calling corresponding save, remove, and update methods from the parent class. These DAO methods allow performing CRUD operations on User data stored in a database using Hibernate.

Uploaded by

Fabiano Farah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

UserDao.

java

package br.hibernate.dao;

import br.hibernate.beans.User;

public class UserDao extends GenericDao {

public UserDao() {}

public int addUser(User user){


saveOfUpdatePojo(user);
return user.getId();
}

public void removeUser(User user){


removePojo(user);
}

public void updateUser(User user){


saveOfUpdatePojo(user);
}

Page 1

You might also like