MetadataCASUpdate update = new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN,
StringUtils.format( "SELECT %1$s FROM %2$s WHERE %3$s = :key", update.getValueColumn(), update.getTableName(), update.getKeyColumn() .bind("key", update.getKey()) .map(ByteArrayMapper.FIRST) .first(); if (!Arrays.equals(currentValue, update.getOldValue())) { return false; StringUtils.format( "INSERT INTO %1$s (%2$s, %3$s) VALUES (:key, :value)", update.getTableName(), update.getKeyColumn(), update.getValueColumn() .bind("key", update.getKey()) .bind("value", update.getNewValue()) .execute(); } else { StringUtils.format( "UPDATE %1$s SET %3$s=:value WHERE %2$s=:key", update.getTableName(), update.getKeyColumn(), update.getValueColumn()
StringUtils.format( "SELECT %1$s FROM %2$s WHERE %3$s = :key", update.getValueColumn(), update.getTableName(), update.getKeyColumn() .bind("key", update.getKey()) .map(ByteArrayMapper.FIRST) .first(); if (!Arrays.equals(currentValue, update.getOldValue())) { return false; StringUtils.format( "INSERT INTO %1$s (%2$s, %3$s) VALUES (:key, :value)", update.getTableName(), update.getKeyColumn(), update.getValueColumn() .bind("key", update.getKey()) .bind("value", update.getNewValue()) .execute(); } else { StringUtils.format( "UPDATE %1$s SET %3$s=:value WHERE %2$s=:key", update.getTableName(), update.getKeyColumn(), update.getValueColumn()
if (userMap != null) { updates.add( new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN, new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN,
MetadataCASUpdate update = new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN,
if (userMap != null) { updates.add( new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN, new MetadataCASUpdate( connectorConfig.getConfigTable(), MetadataStorageConnector.CONFIG_TABLE_KEY_COLUMN,