Codota Logo
SimpleBuilders$RowBuilder
Code IndexAdd Codota to your IDE (free)

How to use
SimpleBuilders$RowBuilder
in
org.apache.cassandra.db

Best Java code snippets using org.apache.cassandra.db.SimpleBuilders$RowBuilder (Showing top 20 results out of 315)

  • Common ways to obtain SimpleBuilders$RowBuilder
private void myMethod () {
SimpleBuilders$RowBuilder s =
  • Codota IconCFMetaData metadata;Object[] clusteringColumns;new RowBuilder(metadata, clusteringColumns)
  • Smart code suggestions by Codota
}
origin: com.strapdata.cassandra/cassandra-all

public Row.SimpleBuilder row(Object... clusteringValues)
{
  Clustering clustering = makeClustering(metadata, clusteringValues);
  RowBuilder builder = rowBuilders.get(clustering);
  if (builder == null)
  {
    builder = new RowBuilder(metadata, clustering);
    rowBuilders.put(clustering, builder);
  }
  copyParams(builder);
  return builder;
}
origin: org.apache.cassandra/cassandra-all

public PartitionUpdate build()
{
  // Collect all updated columns
  PartitionColumns.Builder columns = PartitionColumns.builder();
  for (RowBuilder builder : rowBuilders.values())
    columns.addAll(builder.columns());
  // Note that rowBuilders.size() could include the static column so could be 1 off the really need capacity
  // of the final PartitionUpdate, but as that's just a sizing hint, we'll live.
  PartitionUpdate update = new PartitionUpdate(metadata, key, columns.build(), rowBuilders.size());
  update.addPartitionDeletion(partitionDeletion);
  if (rangeBuilders != null)
  {
    for (RTBuilder builder : rangeBuilders)
      update.add(builder.build());
  }
  for (RowBuilder builder : rowBuilders.values())
    update.add(builder.build());
  return update;
}
origin: jsevellec/cassandra-unit

private Row.SimpleBuilder add(String columnName, Object value, boolean overwriteForCollection)
  maybeInit();
  ColumnDefinition column = getColumn(columnName);
    builder.addCell(cell(column, toByteBuffer(value, column.type), null));
    return this;
      assert value instanceof List;
      for (Object elt : (List)value)
        builder.addCell(cell(column, toByteBuffer(elt, lt.getElementsType()), CellPath.create(ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes()))));
      break;
    case SET:
      assert value instanceof Set;
      for (Object elt : (Set)value)
        builder.addCell(cell(column, ByteBufferUtil.EMPTY_BYTE_BUFFER, CellPath.create(toByteBuffer(elt, st.getElementsType()))));
      break;
    case MAP:
      assert value instanceof Map;
      for (Map.Entry entry : ((Map<?, ?>)value).entrySet())
        builder.addCell(cell(column,
                   toByteBuffer(entry.getValue(), mt.getValuesType()),
                   CellPath.create(toByteBuffer(entry.getKey(), mt.getKeysType()))));
      break;
    default:
origin: org.apache.cassandra/cassandra-all

public Row build()
{
  maybeInit();
  return builder.build();
}
origin: jsevellec/cassandra-unit

public Row.SimpleBuilder add(String columnName, Object value)
{
  return add(columnName, value, true);
}
origin: org.apache.cassandra/cassandra-all

public Row.SimpleBuilder delete(String columnName)
{
  return add(columnName, null);
}
origin: jsevellec/cassandra-unit

public Row.SimpleBuilder delete(String columnName)
{
  return add(columnName, null);
}
origin: jsevellec/cassandra-unit

public Row.SimpleBuilder appendAll(String columnName, Object value)
{
  return add(columnName, value, false);
}
origin: com.strapdata.cassandra/cassandra-all

public Row.SimpleBuilder add(String columnName, Object value)
{
  return add(columnName, value, true);
}
origin: com.strapdata.cassandra/cassandra-all

public Row.SimpleBuilder delete(String columnName)
{
  return add(columnName, null);
}
origin: com.strapdata.cassandra/cassandra-all

public Row.SimpleBuilder appendAll(String columnName, Object value)
{
  return add(columnName, value, false);
}
origin: org.apache.cassandra/cassandra-all

/**
 * Creates a new simple row builder.
 *
 * @param metadata the metadata of the table this is a row of.
 * @param clusteringValues the value for the clustering columns of the row to add to this build. There may be no
 * values if either the table has no clustering column, or if you want to edit the static row. Note that as a
 * shortcut it is also allowed to pass a {@code Clustering} object directly, in which case that should be the
 * only argument.
 * @return a newly created builder.
 */
public static Row.SimpleBuilder simpleBuilder(CFMetaData metadata, Object... clusteringValues)
{
  return new SimpleBuilders.RowBuilder(metadata, clusteringValues);
}
origin: jsevellec/cassandra-unit

/**
 * Creates a new simple row builder.
 *
 * @param metadata the metadata of the table this is a row of.
 * @param clusteringValues the value for the clustering columns of the row to add to this build. There may be no
 * values if either the table has no clustering column, or if you want to edit the static row. Note that as a
 * shortcut it is also allowed to pass a {@code Clustering} object directly, in which case that should be the
 * only argument.
 * @return a newly created builder.
 */
public static Row.SimpleBuilder simpleBuilder(CFMetaData metadata, Object... clusteringValues)
{
  return new SimpleBuilders.RowBuilder(metadata, clusteringValues);
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Creates a new simple row builder.
 *
 * @param metadata the metadata of the table this is a row of.
 * @param clusteringValues the value for the clustering columns of the row to add to this build. There may be no
 * values if either the table has no clustering column, or if you want to edit the static row. Note that as a
 * shortcut it is also allowed to pass a {@code Clustering} object directly, in which case that should be the
 * only argument.
 * @return a newly created builder.
 */
public static Row.SimpleBuilder simpleBuilder(CFMetaData metadata, Object... clusteringValues)
{
  return new SimpleBuilders.RowBuilder(metadata, clusteringValues);
}
origin: org.apache.cassandra/cassandra-all

public Row.SimpleBuilder appendAll(String columnName, Object value)
{
  return add(columnName, value, false);
}
origin: jsevellec/cassandra-unit

public PartitionUpdate build()
{
  // Collect all updated columns
  PartitionColumns.Builder columns = PartitionColumns.builder();
  for (RowBuilder builder : rowBuilders.values())
    columns.addAll(builder.columns());
  // Note that rowBuilders.size() could include the static column so could be 1 off the really need capacity
  // of the final PartitionUpdate, but as that's just a sizing hint, we'll live.
  PartitionUpdate update = new PartitionUpdate(metadata, key, columns.build(), rowBuilders.size());
  update.addPartitionDeletion(partitionDeletion);
  if (rangeBuilders != null)
  {
    for (RTBuilder builder : rangeBuilders)
      update.add(builder.build());
  }
  for (RowBuilder builder : rowBuilders.values())
    update.add(builder.build());
  return update;
}
origin: com.strapdata.cassandra/cassandra-all

public Row build()
{
  maybeInit();
  return builder.build();
}
origin: com.strapdata.cassandra/cassandra-all

public PartitionUpdate build()
{
  // Collect all updated columns
  PartitionColumns.Builder columns = PartitionColumns.builder();
  for (RowBuilder builder : rowBuilders.values())
    columns.addAll(builder.columns());
  // Note that rowBuilders.size() could include the static column so could be 1 off the really need capacity
  // of the final PartitionUpdate, but as that's just a sizing hint, we'll live.
  PartitionUpdate update = new PartitionUpdate(metadata, key, columns.build(), rowBuilders.size());
  update.addPartitionDeletion(partitionDeletion);
  if (rangeBuilders != null)
  {
    for (RTBuilder builder : rangeBuilders)
      update.add(builder.build());
  }
  for (RowBuilder builder : rowBuilders.values())
    update.add(builder.build());
  return update;
}
origin: jsevellec/cassandra-unit

public Row build()
{
  maybeInit();
  return builder.build();
}
origin: jsevellec/cassandra-unit

public Row.SimpleBuilder row(Object... clusteringValues)
{
  Clustering clustering = makeClustering(metadata, clusteringValues);
  RowBuilder builder = rowBuilders.get(clustering);
  if (builder == null)
  {
    builder = new RowBuilder(metadata, clustering);
    rowBuilders.put(clustering, builder);
  }
  copyParams(builder);
  return builder;
}
org.apache.cassandra.dbSimpleBuilders$RowBuilder

Most used methods

  • <init>
  • add
  • build
  • cell
  • columns
  • getColumn
  • maybeInit
  • toByteBuffer

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now