package com.steering.pss.qcm;

import java.util.ArrayList;
import CoreFS.SA06.CoreReturnObject;

import com.steering.comm.db.DBCommon;

/**
 * 平台的使用类都必须继承自平台的CoreIComponent类
 * @author 2014/09/24
 * @version v1.0
 * @modify 1392
 */
public class CoreProducCHEMBIAS extends DBCommon {
    public CoreReturnObject doQuery(Boolean includeDeleted) {
        String deletedFlag = includeDeleted ? "0" : "";
        Object[] params = new Object[] { deletedFlag };
        return this.getDataBySqlID("CoreProcessCHEMBIAS.QUERY", params);
    }

    public CoreReturnObject doSelect(String code, String name) {
        Object[] params = new Object[] { code, name };
        return this.getDataBySqlID("CoreProcessCHEMBIAS.SELECT", params);
    }

    public CoreReturnObject doAdd(ArrayList<Object> parms) {
        return this.setDataBySqlID("CoreProcessCHEMBIAS.ADD", parms.toArray());
    }

    public CoreReturnObject doUpdate(ArrayList<Object> parms) {
        return this.setDataBySqlID("CoreProcessCHEMBIAS.doUpdate",
                parms.toArray());
    }

    public CoreReturnObject deleteLineInfo(ArrayList<Object> parms,
            Boolean isDelete) {
        if (isDelete) {
            return this.setDataBySqlID("CoreProcessCHEMBIAS.DELETE",
                    parms.toArray());
        }
        else {
            return this.setDataBySqlID("CoreProcessCHEMBIAS.RESUME",
                    parms.toArray());
        }
    }


}
