}
if (columnName != null) { // Single column delete
deletion.setPredicate(new SlicePredicate().setColumn_names(Collections
.singletonList(columnName)));
} // else Delete entire column family or supercolumn
columnFamilyMutations.add(new Mutation().setDeletion(deletion));
} else { // Insert/update
ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
if (superColumn != null) {
List<Column> columns = new ArrayList<Column>();
Column col = new Column(columnName);
col.setValue(value);
col.setTimestamp(microTimestamp());
columns.add(col);
cosc.setSuper_column(new SuperColumn(superColumn, columns));
} else {
Column col = new Column(columnName);
col.setValue(value);
col.setTimestamp(microTimestamp());
cosc.setColumn(col);
}
columnFamilyMutations.add(new Mutation().setColumn_or_supercolumn(cosc));
}
}