Codota Logo
ColumnCondition$UDTBound
Code IndexAdd Codota to your IDE (free)

How to use
ColumnCondition$UDTBound
in
org.apache.cassandra.cql3

Best Java code snippets using org.apache.cassandra.cql3.ColumnCondition$UDTBound (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.cassandra/cassandra-all

  public boolean appliesTo(Row row) throws InvalidRequestException
  {
    UserType userType = (UserType) column.type;
    ByteBuffer rowValue;
    if (userType.isMultiCell())
    {
      Iterator<Cell> iter = getCells(row, column);
      rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null;
    }
    else
    {
      Cell cell = getCell(row, column);
      rowValue = cell == null ? null : cell.value();
    }
    if (value == null)
    {
      if (operator == Operator.EQ)
        return rowValue == null;
      else if (operator == Operator.NEQ)
        return rowValue != null;
      else
        throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator));
    }
    return compareWithOperator(operator, userType, value, rowValue);
  }
}
origin: jsevellec/cassandra-unit

public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException
{
  boolean isInCondition = operator == Operator.IN;
  if (column.type instanceof CollectionType)
  {
    if (collectionElement != null)
      return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options);
    else
      return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options);
  }
  else if (column.type.isUDT())
  {
    if (field != null)
      return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options);
    else
      return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options);
  }
  return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options);
}
origin: org.apache.cassandra/cassandra-all

public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException
{
  boolean isInCondition = operator == Operator.IN;
  if (column.type instanceof CollectionType)
  {
    if (collectionElement != null)
      return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options);
    else
      return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options);
  }
  else if (column.type.isUDT())
  {
    if (field != null)
      return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options);
    else
      return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options);
  }
  return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options);
}
origin: com.strapdata.cassandra/cassandra-all

public ColumnCondition.Bound bind(QueryOptions options) throws InvalidRequestException
{
  boolean isInCondition = operator == Operator.IN;
  if (column.type instanceof CollectionType)
  {
    if (collectionElement != null)
      return isInCondition ? new ElementAccessInBound(this, options) : new ElementAccessBound(this, options);
    else
      return isInCondition ? new CollectionInBound(this, options) : new CollectionBound(this, options);
  }
  else if (column.type.isUDT())
  {
    if (field != null)
      return isInCondition ? new UDTFieldAccessInBound(this, options) : new UDTFieldAccessBound(this, options);
    else
      return isInCondition ? new UDTInBound(this, options) : new UDTBound(this, options);
  }
  return isInCondition ? new SimpleInBound(this, options) : new SimpleBound(this, options);
}
origin: jsevellec/cassandra-unit

  public boolean appliesTo(Row row) throws InvalidRequestException
  {
    UserType userType = (UserType) column.type;
    ByteBuffer rowValue;
    if (userType.isMultiCell())
    {
      Iterator<Cell> iter = getCells(row, column);
      rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null;
    }
    else
    {
      Cell cell = getCell(row, column);
      rowValue = cell == null ? null : cell.value();
    }
    if (value == null)
    {
      if (operator == Operator.EQ)
        return rowValue == null;
      else if (operator == Operator.NEQ)
        return rowValue != null;
      else
        throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator));
    }
    return compareWithOperator(operator, userType, value, rowValue);
  }
}
origin: com.strapdata.cassandra/cassandra-all

  public boolean appliesTo(Row row) throws InvalidRequestException
  {
    UserType userType = (UserType) column.type;
    ByteBuffer rowValue;
    if (userType.isMultiCell())
    {
      Iterator<Cell> iter = getCells(row, column);
      rowValue = iter.hasNext() ? userType.serializeForNativeProtocol(iter, protocolVersion) : null;
    }
    else
    {
      Cell cell = getCell(row, column);
      rowValue = cell == null ? null : cell.value();
    }
    if (value == null)
    {
      if (operator == Operator.EQ)
        return rowValue == null;
      else if (operator == Operator.NEQ)
        return rowValue != null;
      else
        throw new InvalidRequestException(String.format("Invalid comparison with null for operator \"%s\"", operator));
    }
    return compareWithOperator(operator, userType, value, rowValue);
  }
}
org.apache.cassandra.cql3ColumnCondition$UDTBound

Javadoc

A non-IN condition on an entire UDT. For example: IF user = {name: 'joe', age: 42}).

Most used methods

  • <init>
  • compareWithOperator

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
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