How to generate JAX-WS annotation from entity class [message #654039] |
Sun, 13 February 2011 12:46 |
Sam  Messages: 7 Registered: March 2010 |
Junior Member |
|
|
Hello,
I want to generate JAX-WS annotation for the following class:
package au.com.housewareonline.dao;
// Generated 13/02/2011 10:57:42 PM by Hibernate Tools 3.4.0.CR1
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Home object for domain model class Role.
* @see au.com.housewareonline.dao.Role
* @author Hibernate Tools
*/
@Stateless
public class RoleHome {
private static final Log log = LogFactory.getLog(RoleHome.class);
@PersistenceContext
private EntityManager entityManager;
public void persist(Role transientInstance) {
log.debug("persisting Role instance");
try {
entityManager.persist(transientInstance);
log.debug("persist successful");
} catch (RuntimeException re) {
log.error("persist failed", re);
throw re;
}
}
public void remove(Role persistentInstance) {
log.debug("removing Role instance");
try {
entityManager.remove(persistentInstance);
log.debug("remove successful");
} catch (RuntimeException re) {
log.error("remove failed", re);
throw re;
}
}
public Role merge(Role detachedInstance) {
log.debug("merging Role instance");
try {
Role result = entityManager.merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public Role findById(long id) {
log.debug("getting Role instance with id: " + id);
try {
Role instance = entityManager.find(Role.class, id);
log.debug("get successful");
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
}
Very appreciate for any suggestion and help.
Thanks
Sam
|
|
|
Powered by
FUDForum. Page generated in 0.02110 seconds