Package org.apache.cassandra.db
Class SimpleBuilders.RowBuilder
java.lang.Object
org.apache.cassandra.db.SimpleBuilders.RowBuilder
- All Implemented Interfaces:
Row.SimpleBuilder
- Enclosing class:
- SimpleBuilders
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a value to a given column.Appends new values to a given non-frozen collection column.build()Returns the built row.protected voidcopyParams(org.apache.cassandra.db.SimpleBuilders.AbstractBuilder<?> other) delete()Deletes the whole row.Removes the value for a given column (creating a tombstone).Deletes the whole row with a timestamp that is just before the new data's timestamp, to make sure no expired data remains on the row.Don't include any primary keyLivenessInfoin the built row.nowInSec(long nowInSec) timestamp(long timestamp) ttl(int ttl) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.db.rows.Row.SimpleBuilder
timestamp, ttl
-
Field Details
-
timestamp
protected long timestamp -
ttl
protected int ttl -
nowInSec
protected long nowInSec
-
-
Constructor Details
-
RowBuilder
-
-
Method Details
-
add
Description copied from interface:Row.SimpleBuilderAdds a value to a given column.- Specified by:
addin interfaceRow.SimpleBuilder- Parameters:
columnName- the name of the column for which to add a new value.value- the value to add, which must be of the proper type forcolumnName. This can benullin which case the this is equivalent todelete(columnName).- Returns:
- this builder.
-
appendAll
Description copied from interface:Row.SimpleBuilderAppends new values to a given non-frozen collection column.This method is similar to
add()but the collection elements added through this method are "appended" to any pre-exising elements. In other words, this is likeadd()except that it doesn't delete the previous value of the collection. This can only be called on non-frozen collection columns.Note that this method can be used in replacement of
add()if you know that there can't be any pre-existing value for that column, in which case this is slightly less expensive as it avoid the collection tombstone inherent toadd().- Specified by:
appendAllin interfaceRow.SimpleBuilder- Parameters:
columnName- the name of the column for which to add a new value, which must be a non-frozen collection.value- the value to add, which must be of the proper type forcolumnName(in other words, it must be a collection).- Returns:
- this builder.
-
delete
Description copied from interface:Row.SimpleBuilderDeletes the whole row.If called, this is generally the only method called on the builder (outside of
timestamp().- Specified by:
deletein interfaceRow.SimpleBuilder- Returns:
- this builder.
-
deletePrevious
Description copied from interface:Row.SimpleBuilderDeletes the whole row with a timestamp that is just before the new data's timestamp, to make sure no expired data remains on the row.- Specified by:
deletePreviousin interfaceRow.SimpleBuilder- Returns:
- this builder.
-
delete
Description copied from interface:Row.SimpleBuilderRemoves the value for a given column (creating a tombstone).- Specified by:
deletein interfaceRow.SimpleBuilder- Parameters:
columnName- the name of the column to delete.- Returns:
- this builder.
-
noPrimaryKeyLivenessInfo
Description copied from interface:Row.SimpleBuilderDon't include any primary keyLivenessInfoin the built row.- Specified by:
noPrimaryKeyLivenessInfoin interfaceRow.SimpleBuilder- Returns:
- this builder.
-
build
Description copied from interface:Row.SimpleBuilderReturns the built row.- Specified by:
buildin interfaceRow.SimpleBuilder- Returns:
- the built row.
-
copyParams
protected void copyParams(org.apache.cassandra.db.SimpleBuilders.AbstractBuilder<?> other) -
timestamp
-
ttl
-
nowInSec
-