Package cirrus.hibernate

Examples of cirrus.hibernate.Session.load()


        try
        {
            tx = s.beginTransaction(  );

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

            /* Order + Items*/
            Order    order = new Order( cst );
            Map      cart = getCart(  );
            Iterator it = cart.keySet(  ).iterator(  );
View Full Code Here


            Iterator it = cart.keySet(  ).iterator(  );

            while ( it.hasNext(  ) )
            {
                String  itemId = ( String ) it.next(  );
                Item    item = ( Item ) s.load( Item.class, itemId );
                Integer quantity = ( Integer ) cart.get( itemId );
                order.add( item, quantity.intValue(  ) );
            }

            /* Save */
 
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            _product = ( Product ) s.load( Product.class, _productId );

            /*
             * Since product.item is lazy loaded,
             * traverse the collection to load all the product to display
             */
 
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            Customer c = ( Customer ) s.load( Customer.class, _userId );

            if ( c.getAccount(  ).matchPassword( _password ) )
            {
                initSession( c );
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            _customer = ( Customer ) s.load( Customer.class, getUserId(  ) );

            return SUCCESS;
        }
        finally
        {
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            _item = ( Item ) s.load( Item.class, _itemId );

            return SUCCESS;
        }
        finally
        {
View Full Code Here

                    while ( it.hasNext(  ) )
                    {
                        String  itemId = ( String ) it.next(  );
                        Integer quantity = ( Integer ) cart.get( itemId );
                        Item    item = ( Item ) s.load( Item.class, itemId );

                        _cartItems.add( new OrderItem( item, quantity.intValue(  ) ) );
                    }
                }
            }
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            _category = ( Category ) s.load( Category.class, _categoryId );

            /*
             * Since category.product is lazy loaded,
             * traverse the collection to load all the product to display
             */
 
View Full Code Here

    {
        Session s = getHibernateSession(  );

        try
        {
            _customer = ( Customer ) s.load( Customer.class, getUserId(  ) );

            return SUCCESS;
        }
        finally
        {
View Full Code Here

            tx = s.beginTransaction(  );

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

                if ( !c.getUserId(  ).equalsIgnoreCase( _customer.getUserId(  ) ) )
                {
                    addError( "customer", getText( "duplicate_account" ) );

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.