示例#1
0
 @Override
 public void updateRowImpl(String tableName, Object rowKey, Map<String, Object> values) {
   Map<String, Object> valuesWithKey = new HashMap<String, Object>(values);
   String primaryKeyName = getTablePrimaryKeyName(tableName);
   valuesWithKey.put(primaryKeyName, rowKey);
   List<Map<String, Object>> rowList = new ArrayList<Map<String, Object>>();
   rowList.add(valuesWithKey);
   updateRowsAndNotify(tableName, rowList);
 }
示例#2
0
 @Override
 public void updateMatchingRowsImpl(
     String tableName, IPredicate predicate, Map<String, Object> values) {
   String primaryKeyName = getTablePrimaryKeyName(tableName);
   String[] columnNameList = {primaryKeyName};
   IResultSet resultSet = executeQuery(tableName, columnNameList, predicate, null);
   Set<Object> rowKeys = new HashSet<Object>();
   while (resultSet.next()) {
     String rowKey = resultSet.getString(primaryKeyName);
     rowKeys.add(rowKey);
   }
   updateRowsAndNotify(tableName, rowKeys, values);
 }
示例#3
0
 @Override
 public void updateRowImpl(String tableName, Map<String, Object> values) {
   List<Map<String, Object>> rowKeys = new ArrayList<Map<String, Object>>();
   rowKeys.add(values);
   updateRowsAndNotify(tableName, rowKeys);
 }