@Override public ColumnListMutation<C> delete() { // Delete the entire super column Deletion d = new Deletion().setSuper_column(path.get(0)).setTimestamp(timestamp); mutationList.add(new Mutation().setDeletion(d)); timestamp++; return this; }
@Override public ColumnListMutation<C> deleteColumn(C columnName) { if (deletionPredicate == null) { deletionPredicate = new SlicePredicate(); Deletion d = new Deletion().setTimestamp(timestamp).setSuper_column(path.get(0)) .setPredicate(deletionPredicate); mutationList.add(new Mutation().setDeletion(d)); } deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName)); return this; }
@Override public ColumnListMutation<C> deleteColumn(C columnName) { if (deletionPredicate == null) { deletionPredicate = new SlicePredicate(); Deletion d = new Deletion().setTimestamp(timestamp).setSuper_column(path.get(0)) .setPredicate(deletionPredicate); mutationList.add(new Mutation().setDeletion(d)); } deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName)); return this; }
@Override public ColumnListMutation<C> delete() { // Delete the entire super column Deletion d = new Deletion().setSuper_column(path.get(0)).setTimestamp(timestamp); mutationList.add(new Mutation().setDeletion(d)); timestamp++; return this; }
@Override public ColumnListMutation<C> deleteColumn(C columnName) { if (deletionPredicate == null) { deletionPredicate = new SlicePredicate(); Deletion d = new Deletion(); d.setTimestamp(timestamp); d.setSuper_column(path.get(0)); d.setPredicate(deletionPredicate); mutationList.add(new Mutation().setDeletion(d)); } deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName)); return this; }
@Override public ColumnListMutation<C> delete() { Deletion d = new Deletion(); d.setSuper_column(path.get(0)); d.setTimestamp(timestamp); mutationList.add(new Mutation().setDeletion(d)); timestamp++; return this; }
@Override public ColumnListMutation<C> deleteColumn(C columnName) { if (deletionPredicate == null) { deletionPredicate = new SlicePredicate(); Deletion d = new Deletion(); d.setTimestamp(timestamp); d.setSuper_column(path.get(0)); d.setPredicate(deletionPredicate); mutationList.add(new Mutation().setDeletion(d)); } deletionPredicate.addToColumn_names(path.getSerializer().toByteBuffer(columnName)); return this; }
@Override public ColumnListMutation<C> delete() { Deletion d = new Deletion(); d.setSuper_column(path.get(0)); d.setTimestamp(timestamp); mutationList.add(new Mutation().setDeletion(d)); timestamp++; return this; }
@Override public ColumnListMutation<C> incrementCounterColumn(C columnName, long amount) { // 1. Set up the column with all the data CounterColumn column = new CounterColumn(); column.setName(path.getSerializer().toByteBuffer(columnName)); column.setValue(amount); // 2. Create the super column mutation if this is the first call if (superColumn == null) { superColumn = new CounterSuperColumn().setName(path.get(0)); Mutation mutation = new Mutation(); mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setCounter_super_column(superColumn)); mutationList.add(mutation); } superColumn.addToColumns(column); return this; }
private void addMutation(Column column) { // 2. Create the super column mutation if this is the first call if (superColumn == null) { superColumn = new SuperColumn().setName(path.get(0)); Mutation mutation = new Mutation(); mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setSuper_column(superColumn)); mutationList.add(mutation); } superColumn.addToColumns(column); }
@Override public ColumnListMutation<C> incrementCounterColumn(C columnName, long amount) { // 1. Set up the column with all the data CounterColumn column = new CounterColumn(); column.setName(path.getSerializer().toByteBuffer(columnName)); column.setValue(amount); // 2. Create the super column mutation if this is the first call if (superColumn == null) { superColumn = new CounterSuperColumn().setName(path.get(0)); Mutation mutation = new Mutation(); mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setCounter_super_column(superColumn)); mutationList.add(mutation); } superColumn.addToColumns(column); return this; }
private void addMutation(Column column) { // 2. Create the super column mutation if this is the first call if (superColumn == null) { superColumn = new SuperColumn().setName(path.get(0)); Mutation mutation = new Mutation(); mutation.setColumn_or_supercolumn(new ColumnOrSuperColumn().setSuper_column(superColumn)); mutationList.add(mutation); } superColumn.addToColumns(column); }