public final class Mutation extends Object implements MutationApi<Mutation>, Serializable
MutationApi that can be used to create and represent a
list of mutations. It used by RowMutation and ConditionalRowMutation to
encapsulate a list of mutations that will to be applied to a single row.| Modifier and Type | Method and Description |
|---|---|
static Mutation |
create()
Creates new instance of Mutation object.
|
static Mutation |
createUnsafe()
Creates new instance of Mutation object which allows setCell operation to use server side
timestamp.
|
Mutation |
deleteCells(String familyName,
com.google.protobuf.ByteString qualifier)
Adds a mutation which deletes cells from the specified column.
|
Mutation |
deleteCells(String familyName,
com.google.protobuf.ByteString qualifier,
Range.TimestampRange timestampRange)
Adds a mutation which deletes cells from the specified column, restricted to a given timestamp
range.
|
Mutation |
deleteCells(String familyName,
String qualifier)
Adds a mutation which deletes cells from the specified column.
|
Mutation |
deleteFamily(String familyName)
Adds a mutation which deletes all cells from the specified column family.
|
Mutation |
deleteRow()
Adds a mutation which deletes all cells from the containing row.
|
Mutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
com.google.protobuf.ByteString value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
long timestamp,
com.google.protobuf.ByteString value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
long timestamp,
String value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
String value)
Adds a mutation which sets the value of the specified cell.
|
public static Mutation create()
@BetaApi public static Mutation createUnsafe()
public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, @Nonnull String value)
MutationApiThis a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value)
MutationApiThis is a convenience override that converts Strings to ByteStrings.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull com.google.protobuf.ByteString value)
MutationApiUses microseconds since epoch as the timestamp.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, @Nonnull com.google.protobuf.ByteString value)
MutationApisetCell in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull String qualifier)
MutationApideleteCells in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier)
MutationApideleteCells in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull Range.TimestampRange timestampRange)
MutationApideleteCells in interface MutationApi<Mutation>familyName - The family name.qualifier - The qualifier.timestampRange - The timestamp range in microseconds.public Mutation deleteFamily(@Nonnull String familyName)
MutationApideleteFamily in interface MutationApi<Mutation>public Mutation deleteRow()
MutationApideleteRow in interface MutationApi<Mutation>Copyright © 2018 Google LLC. All rights reserved.