package oracle.fodemo.storefront.store.queries;

import oracle.jbo.domain.Number;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.ViewRowImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------

public class ShoppingCartTransientVORowImpl extends ViewRowImpl {

    /**
     * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify.
     */
    public enum AttributesEnum {
        ProductId {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getProductId();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setProductId((Number)value);
            }
        }
        ,
        ListPrice {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getListPrice();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setListPrice((Number)value);
            }
        }
        ,
        Description {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getDescription();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setDescription((String)value);
            }
        }
        ,
        AdditionalInformation {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getAdditionalInformation();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setAdditionalInformation((String)value);
            }
        }
        ,
        Quantity {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getQuantity();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setQuantity((Integer)value);
            }
        }
        ,
        CategoryName {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getCategoryName();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setCategoryName((String)value);
            }
        }
        ,
        ShippingCost {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getShippingCost();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setShippingCost((Number)value);
            }
        }
        ,
        ProductName {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getProductName();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setProductName((String)value);
            }
        }
        ,
        LineItemTotal {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getLineItemTotal();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setLineItemTotal((Number)value);
            }
        }
        ,
        LineItemsSubtotal {
            public Object get(ShoppingCartTransientVORowImpl obj) {
                return obj.getLineItemsSubtotal();
            }

            public void put(ShoppingCartTransientVORowImpl obj, Object value) {
                obj.setLineItemsSubtotal((Number)value);
            }
        }
        ;
        private static AttributesEnum[] vals = null;
        private static int firstIndex = 0;

        /**
         * @param object
         * @return
         */
        public abstract Object get(ShoppingCartTransientVORowImpl object);

        /**
         * @param object
         * @param value
         */
        public abstract void put(ShoppingCartTransientVORowImpl object,
                                 Object value);

        /**
         * @return
         */
        public int index() {
            return AttributesEnum.firstIndex() + ordinal();
        }

        /**
         * @return
         */
        public static int firstIndex() {
            return firstIndex;
        }

        /**
         * @return
         */
        public static int count() {
            return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
        }

        /**
         * @return
         */
        public static AttributesEnum[] staticValues() {
            if (vals == null) {
                vals = AttributesEnum.values();
            }
            return vals;
        }
    }
    public static final int PRODUCTID = AttributesEnum.ProductId.index();
    public static final int LISTPRICE = AttributesEnum.ListPrice.index();
    public static final int DESCRIPTION = AttributesEnum.Description.index();
    public static final int ADDITIONALINFORMATION = AttributesEnum.AdditionalInformation.index();
    public static final int QUANTITY = AttributesEnum.Quantity.index();
    public static final int CATEGORYNAME = AttributesEnum.CategoryName.index();
    public static final int SHIPPINGCOST = AttributesEnum.ShippingCost.index();
    public static final int PRODUCTNAME = AttributesEnum.ProductName.index();
    public static final int LINEITEMTOTAL = AttributesEnum.LineItemTotal.index();
    public static final int LINEITEMSSUBTOTAL = AttributesEnum.LineItemsSubtotal.index();


    /**This is the default constructor (do not remove).
     */
    public ShoppingCartTransientVORowImpl() {
    }

    /**Gets the attribute value for the calculated attribute ProductId.
     * @return
     */
    public Number getProductId() {
        return (Number) getAttributeInternal(PRODUCTID);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute ProductId.
     * @param value
     */
    public void setProductId(Number value) {
        setAttributeInternal(PRODUCTID, value);
    }

    /**Gets the attribute value for the calculated attribute ListPrice.
     * @return
     */
    public Number getListPrice() {
        return (Number) getAttributeInternal(LISTPRICE);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute ListPrice.
     * @param value
     */
    public void setListPrice(Number value) {
        setAttributeInternal(LISTPRICE, value);
    }

    /**Gets the attribute value for the calculated attribute Description.
     * @return
     */
    public String getDescription() {
        return (String) getAttributeInternal(DESCRIPTION);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute Description.
     * @param value
     */
    public void setDescription(String value) {
        setAttributeInternal(DESCRIPTION, value);
    }

    /**Gets the attribute value for the calculated attribute AdditionalInformation.
     * @return
     */
    public String getAdditionalInformation() {
        return (String) getAttributeInternal(ADDITIONALINFORMATION);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute AdditionalInformation.
     * @param value
     */
    public void setAdditionalInformation(String value) {
        setAttributeInternal(ADDITIONALINFORMATION, value);
    }

    /**Gets the attribute value for the calculated attribute Quantity.
     * @return
     */
    public Integer getQuantity() {
        return (Integer) getAttributeInternal(QUANTITY);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute Quantity.
     * @param value
     */
    public void setQuantity(Integer value) {
        setAttributeInternal(QUANTITY, value);
    }

    /**Gets the attribute value for the calculated attribute CategoryName.
     * @return
     */
    public String getCategoryName() {
        return (String) getAttributeInternal(CATEGORYNAME);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute CategoryName.
     * @param value
     */
    public void setCategoryName(String value) {
        setAttributeInternal(CATEGORYNAME, value);
    }

    /**Gets the attribute value for the calculated attribute ShippingCost.
     * @return
     */
    public Number getShippingCost() {
        return (Number) getAttributeInternal(SHIPPINGCOST);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute ShippingCost.
     * @param value
     */
    public void setShippingCost(Number value) {
        setAttributeInternal(SHIPPINGCOST, value);
    }

    /**Gets the attribute value for the calculated attribute ProductName.
     * @return
     */
    public String getProductName() {
        return (String) getAttributeInternal(PRODUCTNAME);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute ProductName.
     * @param value
     */
    public void setProductName(String value) {
        setAttributeInternal(PRODUCTNAME, value);
    }

    /**Gets the attribute value for the calculated attribute LineItemTotal.
     * @return
     */
    public Number getLineItemTotal() {
        return (Number) getAttributeInternal(LINEITEMTOTAL);
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute LineItemTotal.
     * @param value
     */
    public void setLineItemTotal(Number value) {
        setAttributeInternal(LINEITEMTOTAL, value);
    }

    /**getAttrInvokeAccessor: generated method. Do not modify.
     * @param index
     * @param attrDef
     * @return
     * @throws Exception
     */
    protected Object getAttrInvokeAccessor(int index, 
                                           AttributeDefImpl attrDef) throws Exception {
        if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
            return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this);
        }
        return super.getAttrInvokeAccessor(index, attrDef);
    }

    /**setAttrInvokeAccessor: generated method. Do not modify.
     * @param index
     * @param value
     * @param attrDef
     * @throws Exception
     */
    protected void setAttrInvokeAccessor(int index, Object value, 
                                         AttributeDefImpl attrDef) throws Exception {
        if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
            AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value);
            return;
        }
        super.setAttrInvokeAccessor(index, value, attrDef);
    }

    /**Gets the attribute value for the calculated attribute LineItemsSubtotal.
     * @return
     */
    public Number getLineItemsSubtotal() {
        return ((ShoppingCartTransientVOImpl)getViewObject()).getLineItemsSubtotal();
    }

    /**Sets <code>value</code> as the attribute value for the calculated attribute LineItemsSubtotal.
     * @param value
     */
    public void setLineItemsSubtotal(Number value) {
        setAttributeInternal(LINEITEMSSUBTOTAL, value);
    }


}
