Beispiel #1
0
 /**
  * 删除*2013.09.05*
  *
  * @param keyId 参数
  * @throws Exception 异常
  */
 @Business
 public void deleteReportFile(String keyId) throws Exception {
   ISqlExecutor exec = SqlExecutorFacotry.getSqlExecutor();
   exec.executeNonQuery(
       exec.getSqlParser()
           .getDeleteCommandString(
               "BMP_REPORTFILE",
               new SqlCondition(
                   "FILE_ID", keyId, SqlLogicType.And, SqlRelationType.In, SqlParamType.String)));
 }
Beispiel #2
0
  /**
   * 更新
   *
   * @param id 参数
   * @param state 状态
   * @return 结果
   * @throws Exception 异常
   */
  public int updateState(int id, int state) throws Exception {
    ISqlExecutor executor = SqlExecutorFacotry.getSqlExecutor();
    DbCommand cmd = new DbCommand(executor.getSqlParser(), DbCommandType.UpdateCommand);
    cmd.setTableName(tableInfo.tableName);
    cmd.addField("TASK_STATE", state);
    cmd.setFilter(
        new SqlCondition(
            "TASK_ID",
            Integer.toString(id),
            SqlLogicType.And,
            SqlRelationType.Equal,
            SqlParamType.Numeric));

    return update(cmd.toString());
  }