Package org.hibernate

Examples of org.hibernate.Session.update()


    }

    @Override
    public SystemNotification updateNotification(SystemNotification notification) {
        Session session = sessionManager.getSession();
        session.update(notification);
        return notification;
    }

    @Override
    public void endNotification(SystemNotification notification) {
View Full Code Here


    @Override
    public void endNotification(SystemNotification notification) {
        Session session = sessionManager.getSession();
        notification.setEndDate(new Date());
        session.update(notification);
    }
}
View Full Code Here

            transaction = session.beginTransaction();
            byte[] salt = UserPasswordUtil.getSalt();
            byte[] passwordHash = UserPasswordUtil.hashPassword(password, salt);

            ((SqlUser) user).setPassword(salt, passwordHash);
            session.update(user);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

            ((SqlUser) user).setCurrentLoginRemoteAddr(remoteAddr);

            int loginCount = user.getLoginCount();
            ((SqlUser) user).setLoginCount(loginCount + 1);

            session.update(user);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

        try {
            transaction = session.beginTransaction();

            sqlUser.setUiPreferences(preferences);

            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

            sqlUser = (SqlUser) findById(userId);
            if (sqlUser == null) {
                throw new LumifyException("User does not exist");
            }
            sqlUser.setUserStatus(status);
            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

        try {
            transaction = session.beginTransaction();

            sqlUser.setDisplayName(displayName);

            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

        try {
            transaction = session.beginTransaction();

            sqlUser.setEmailAddress(emailAddress);

            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

            sqlUser = (SqlUser) findById(user.getUserId());
            if (sqlUser == null) {
                throw new LumifyException("User does not exist");
            }
            sqlUser.setPrivilegesString(Privilege.toString(privileges));
            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

            LOGGER.debug("add %s to workspace table", title);
            newWorkspace.getSqlWorkspaceUserList().add(sqlWorkspaceUser);
            session.save(newWorkspace);
            session.save(sqlWorkspaceUser);
            session.update(user);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.