package devguide.advanced.baseproject.extsub;

import devguide.advanced.baseproject.extsub.common.ProductsRow;

import oracle.jbo.domain.Number;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityImpl;
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 ProductsRowImpl extends ViewRowImpl implements ProductsRow {
    public static final int PRODUCTID = 0;
    public static final int PRODUCTNAME = 1;
    public static final int CHECKSUM = 2;

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

    /**Gets ProductsBase entity object.
     */
    public EntityImpl getProductsBase() {
        return (EntityImpl)getEntity(0);
    }

    /**Gets the attribute value for PRODUCT_ID using the alias name ProductId.
     */
    public Number getProductId() {
        return (Number) getAttributeInternal(PRODUCTID);
    }

    /**Sets <code>value</code> as attribute value for PRODUCT_ID using the alias name ProductId.
     */
    public void setProductId(Number value) {
        setAttributeInternal(PRODUCTID, value);
    }

    /**Gets the attribute value for PRODUCT_NAME using the alias name ProductName.
     */
    public String getProductName() {
        return (String) getAttributeInternal(PRODUCTNAME);
    }

    /**Sets <code>value</code> as attribute value for PRODUCT_NAME using the alias name ProductName.
     */
    public void setProductName(String value) {
        setAttributeInternal(PRODUCTNAME, value);
    }

    /**getAttrInvokeAccessor: generated method. Do not modify.
     */
    protected Object getAttrInvokeAccessor(int index, 
                                           AttributeDefImpl attrDef) throws Exception {
        switch (index) {
        case PRODUCTID:
            return getProductId();
        case PRODUCTNAME:
            return getProductName();
        case CHECKSUM:
            return getCheckSum();
        default:
            return super.getAttrInvokeAccessor(index, attrDef);
        }
    }

    /**setAttrInvokeAccessor: generated method. Do not modify.
     */
    protected void setAttrInvokeAccessor(int index, Object value, 
                                         AttributeDefImpl attrDef) throws Exception {
        switch (index) {
        case PRODUCTID:
            setProductId((Number)value);
            return;
        case PRODUCTNAME:
            setProductName((String)value);
            return;
        case CHECKSUM:
            setCheckSum((String)value);
            return;
        default:
            super.setAttrInvokeAccessor(index, value, attrDef);
            return;
        }
    }

    /**Gets the attribute value for CHECK_SUM using the alias name CheckSum.
     */
    public String getCheckSum() {
        return (String) getAttributeInternal(CHECKSUM);
    }

    /**Sets <code>value</code> as attribute value for CHECK_SUM using the alias name CheckSum.
     */
    public void setCheckSum(String value) {
        setAttributeInternal(CHECKSUM, value);
    }
}
