Package cirrus.hibernate

Examples of cirrus.hibernate.Session.beginTransaction()


        Session     s = getHibernateSession(  );
        Transaction tx = null;

        try
        {
            tx = s.beginTransaction(  );

            /* Customer */
            Customer cst = ( Customer ) s.load( Customer.class, getUserId(  ) );

            /* Order + Items*/
 
View Full Code Here


        Session     s = getHibernateSession(  );
        String      customerId = _customer.getUserId(  );

        try
        {
            tx = s.beginTransaction(  );

            /* Make sure that the user-id is unique */
            try
            {
                Customer c = ( Customer ) s.load( Customer.class, customerId );
View Full Code Here

        {
            session = _sessionFactory.openSession(  );

            BookmarkImpl bk = new BookmarkImpl( null, title, url.toString(), description, user );

            tx = session.beginTransaction(  );
            session.save( bk );
            tx.commit(  );

            return bk.getId(  );
        }
View Full Code Here

            BookmarkImpl bk = ( BookmarkImpl ) session.load( BookmarkImpl.class, id );
            bk.setTitle( title );
            bk.setUrl( url.toString() );
            bk.setDescription( description );

            tx = session.beginTransaction(  );
            session.update( bk );
            tx.commit(  );
        }
        catch( cirrus.hibernate.ObjectNotFoundException o )
        {
View Full Code Here

        try
        {
            session = _sessionFactory.openSession(  );

            tx = session.beginTransaction(  );
            for ( int i = 0; i < ids.length; i++ )
            {
                BookmarkImpl bk = ( BookmarkImpl ) session.load( BookmarkImpl.class, ids[ i ] );
                try
                {
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.