public boolean execUpdate(D6Model modelObj, D6Inex includeExcludeColumnNames) {

    boolean retVal = false;

    if (modelObj == null) {
      return retVal;
    }

    final D6CrudUpdateHelper d6CrudUpdateHelper = new D6CrudUpdateHelper(modelObj.getClass());

    final String updateSQL = d6CrudUpdateHelper.createUpdatePreparedSQLStatement(includeExcludeColumnNames);

    log("#execUpdate updateSQL=" + updateSQL);

    final Connection conn = createConnection();

    try {

      PreparedStatement preparedStmt = null;

      // There is a possibility that the error occurs in one single update
      // statement.
      // Therefore, turn the auto commit off.
      conn.setAutoCommit(false);

      preparedStmt = conn.prepareStatement(updateSQL);

      d6CrudUpdateHelper.map(modelObj, preparedStmt, includeExcludeColumnNames);

      // execute SQL
      preparedStmt.executeUpdate();

      // finally commit
      conn.commit();

      retVal = true;

    } catch (SQLException e) {

      loge("#execUpdate", e);
      retVal = false;

    } catch (D6Exception e) {

      // catch from helper
      loge("#execUpdate", e);
      retVal = false;

    } finally {
      try {
        conn.close();
      } catch (SQLException e) {
        retVal = false;
        loge("#execUpdate", e);
      }
    }
    return retVal;

  }
public boolean execUpdate ( D6Model modelObj , D6Inex includeExcludeColumnNames ) { boolean retVal = false ; if ( modelObj == null ) { return retVal ; } final D6CrudUpdateHelper d6CrudUpdateHelper = new D6CrudUpdateHelper ( modelObj . getClass ( ) ) ; final String updateSQL = d6CrudUpdateHelper . createUpdatePreparedSQLStatement ( includeExcludeColumnNames ) ; log ( "#execUpdate updateSQL=" + updateSQL ) ; final Connection conn = createConnection ( ) ; try { PreparedStatement preparedStmt = null ; conn . setAutoCommit ( false ) ; preparedStmt = conn . prepareStatement ( updateSQL ) ; d6CrudUpdateHelper . map ( modelObj , preparedStmt , includeExcludeColumnNames ) ; preparedStmt . executeUpdate ( ) ; conn . commit ( ) ; retVal = true ; } catch ( SQLException e ) { loge ( "#execUpdate" , e ) ; retVal = false ; } catch ( D6Exception e ) { loge ( "#execUpdate" , e ) ; retVal = false ; } finally { try { conn . close ( ) ; } catch ( SQLException e ) { retVal = false ; loge ( "#execUpdate" , e ) ; } } return retVal ; }
Update Model Object

@param modelObj
@param includeExcludeColumnNames
@return true:DB operation success false:failure