StringBuffer sqlBuffer = new StringBuffer();
StringBuffer sqlBuffer = new StringBuffer(128);
    public OperationData getOperationData(String schemaName,            ITableMetaData metaData) throws DataSetException    {        Column[] columns = metaData.getColumns();        Column[] primaryKeys = metaData.getPrimaryKeys();        // cannot construct where clause if no primary key        if (primaryKeys.length == 0)        {            throw new NoPrimaryKeyException(metaData.getTableName());        }        // update table        StringBuffer sqlBuffer = new StringBuffer();        sqlBuffer.append("update ");        sqlBuffer.append(DataSetUtils.getQualifiedName(schemaName,                metaData.getTableName()));        // set        boolean firstSet = true;        List columnList = new ArrayList(columns.length);        sqlBuffer.append(" set ");        for (int i = 0; i < columns.length; i++)        {            Column column = columns[i];            // set if not primary key            if (DataSetUtils.getColumn(column.getColumnName(), primaryKeys) == null)            {                if (!firstSet)                {                    sqlBuffer.append(", ");                }                firstSet = false;                sqlBuffer.append(column.getColumnName());                sqlBuffer.append(" = ?");                columnList.add(column);            }        }        // where        sqlBuffer.append(" where ");        for (int i = 0; i < primaryKeys.length; i++)        {            Column column = primaryKeys[i];            if (i > 0)            {                sqlBuffer.append(" and ");            }            sqlBuffer.append(column.getColumnName());            sqlBuffer.append(" = ?");            columnList.add(column);        }        return new OperationData(sqlBuffer.toString(),                (Column[])columnList.toArray(new Column[0]));    }