public void update(Object obj) { sessionFactory.getCurrentSession().update(obj); }
public void updateInstance(SensorTask instance) { LOGGER.debug("updateInstance({})", instance); getCurrentSession().update(instance); }
public void updateInstance(SensorConfiguration instance) { LOGGER.debug("updateInstance({})", instance); getCurrentSession().update(instance); }
/** * Update Hibernate persistent object. * * @param object to update */ protected void updateObject(Object obj) { Session session = factory.openSession(); Transaction tx = null; try { tx = session.beginTransaction(); session.update(obj); tx.commit(); } catch (Exception e) { if (tx != null) tx.rollback(); } finally { session.close(); } }
/** * {@inheritDoc} */ @Override public void delete(Group group) { session().update(group); group.getUsers().clear(); saveOrUpdate(group); super.delete(group); }
public void deleteLayerModel(LayerModel lm) throws GeomajasSecurityException, HibernateException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(lm)) { if (!isLayerModelInUse(lm.getClientLayerId())) { lm.setDeleted(true); factory.getCurrentSession().update(lm); } else { throw new HibernateException("Layermodel is still in use."); } } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Remove layermodel", securityContext.getUserName()); } }
public void deleteLayerModel(LayerModel lm) throws GeomajasSecurityException, HibernateException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(lm)) { if (!isLayerModelInUse(lm.getClientLayerId())) { lm.setDeleted(true); factory.getCurrentSession().update(lm); } else { throw new HibernateException("Layermodel is still in use."); } } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Remove layermodel", securityContext.getUserName()); } }
sessionFactory.getCurrentSession().update(rs); } catch (Exception ex) { throw new DaoException(ex);
sessionFactory.getCurrentSession().update(rs); } catch (Exception ex) { throw new DaoException(ex);
sessionFactory.getCurrentSession().update(rs); } catch (Exception ex) { throw new DaoException(ex);