Code example for Session

Methods: save

0
 
    public DeploymentUnitDAO createDeploymentUnit(String name) {
        DeploymentUnitDaoImpl du = new DeploymentUnitDaoImpl();
        du.setName(name);
        du.setDeployDate(new Date());
        _session.save(du);
        return du;
    } 
 
    public DeploymentUnitDAO getDeploymentUnit(String name) {
        try { 
            DeploymentUnitDaoImpl du = (DeploymentUnitDaoImpl) _session.get(DeploymentUnitDaoImpl.class,name);
            return du;
        } catch (HibernateException e) {
            __log.error("DbError", e);
            throw e;
        } 
    } 
 
    public long getNextVersion() { 
Experience pair programming with AI  Get Codota for Java