Package net.sf.hibernate

Examples of net.sf.hibernate.Session.update()


    private void doPersistAction(Object obj, int operation) throws YPersistenceException {
        try {
            Session session = _factory.openSession();
            Transaction tx = session.beginTransaction();
            if (UPDATE_OPERATION == operation) {
                session.update(obj);
            } else if (DELETE_OPERATION == operation) {
                session.delete(obj);
            } else if (SAVE_OPERATION == operation) {
                session.save(obj);
            }
View Full Code Here


                    new Object[]{ new Integer(targetId), name },
                    new Type[]{ Hibernate.INTEGER, Hibernate.STRING });
            if (existingAttributes.size() == 0) {
                session.save(attribute);
            } else {
                session.update(attribute);
            }
        } catch (RuntimeException e) {
            throw e;
        } catch (HibernateException e) {
            throw new RepositoryException(e);
View Full Code Here

        try
        {
          session = this.sessionFactory.openSession();
                   
            if (isUpdate) {
                session.update(item);
            } else {
                session.save(item);
            }

            session.flush();
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.