congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ListType
Code IndexAdd Tabnine to your IDE (free)

How to use
ListType
in
org.apache.cassandra.db.marshal

Best Java code snippets using org.apache.cassandra.db.marshal.ListType (Showing top 20 results out of 315)

origin: Impetus/Kundera

ListSerializer listSerializer = listType.getSerializer();
Collection outputCollection = new ArrayList();
if (useNativeProtocol2)
UserType usertype = (UserType) listType.getElementsType();
Collection result = new ArrayList();
Iterator collectionItems = outputCollection.iterator();
origin: org.apache.cassandra/cassandra-all

public <T> List<T> getList(String column, AbstractType<T> type)
{
  ByteBuffer raw = data.get(column);
  return raw == null ? null : ListType.getInstance(type, true).compose(raw);
}
origin: org.apache.cassandra/cassandra-all

public static synchronized <T> ListType<T> getInstance(AbstractType<T> elements, boolean isMultiCell)
{
  Map<AbstractType<?>, ListType> internMap = isMultiCell ? instances : frozenInstances;
  ListType<T> t = internMap.get(elements);
  if (t == null)
  {
    t = new ListType<T>(elements, isMultiCell);
    internMap.put(elements, t);
  }
  return t;
}
origin: Impetus/Kundera

ListType listType = ListType.getInstance((AbstractType) valueClassInstance, false);
return listType.decompose((List) value).array();
origin: Impetus/Kundera

valueType = ListType.getInstance(parser.parse(), true).toString();
origin: jsevellec/cassandra-unit

  return type.compareForCQL(leftOperand, rightOperand) != 0;
case IN:
  List inValues = ((List) ListType.getInstance(type, false).getSerializer().deserialize(rightOperand));
  return inValues.contains(type.getSerializer().deserialize(leftOperand));
case CONTAINS:
    return list.contains(((ListType) type).getElementsType().getSerializer().deserialize(rightOperand));
origin: Impetus/Kundera

if (((ListType) type).getElementsType().getClass().getSimpleName().equals("UserType"))
origin: jsevellec/cassandra-unit

@Override
public AbstractType<?> freezeNestedMulticellTypes()
{
  if (!isMultiCell())
    return this;
  if (elements.isFreezable() && elements.isMultiCell())
    return getInstance(elements.freeze(), isMultiCell);
  return getInstance(elements.freezeNestedMulticellTypes(), isMultiCell);
}
origin: Impetus/Kundera

try
  listType = ListType.getInstance(new TypeParser(cqlColumnMetadata.substring(
      cqlColumnMetadata.indexOf("("), cqlColumnMetadata.length())));
origin: org.apache.cassandra/cassandra-all

  return listType.compose(foundValue).contains(listType.getElementsType().compose(value));
case SET:
  SetType<?> setType = (SetType<?>)type;
origin: jsevellec/cassandra-unit

@Override
public int compareCustom(ByteBuffer o1, ByteBuffer o2)
{
  return ListType.compareListOrSet(elements, o1, o2);
}
origin: org.apache.cassandra/cassandra-all

  @Override
  public String toJSONString(ByteBuffer buffer, ProtocolVersion protocolVersion)
  {
    return ListType.setOrListToJsonString(buffer, elements, protocolVersion);
  }
}
origin: org.apache.cassandra/cassandra-all

@Override
public String toString(boolean ignoreFreezing)
{
  boolean includeFrozenType = !ignoreFreezing && !isMultiCell();
  StringBuilder sb = new StringBuilder();
  if (includeFrozenType)
    sb.append(FrozenType.class.getName()).append("(");
  sb.append(getClass().getName());
  sb.append(TypeParser.stringifyTypeParameters(Collections.<AbstractType<?>>singletonList(elements), ignoreFreezing || !isMultiCell));
  if (includeFrozenType)
    sb.append(")");
  return sb.toString();
}
origin: org.apache.cassandra/cassandra-all

  return type.compareForCQL(leftOperand, rightOperand) != 0;
case IN:
  List inValues = ((List) ListType.getInstance(type, false).getSerializer().deserialize(rightOperand));
  return inValues.contains(type.getSerializer().deserialize(leftOperand));
case CONTAINS:
    return list.contains(((ListType) type).getElementsType().getSerializer().deserialize(rightOperand));
origin: org.apache.cassandra/cassandra-all

@Override
public boolean referencesUserType(String userTypeName)
{
  return getElementsType().referencesUserType(userTypeName);
}
origin: org.apache.cassandra/cassandra-all

@Override
public AbstractType<?> freezeNestedMulticellTypes()
{
  if (!isMultiCell())
    return this;
  if (elements.isFreezable() && elements.isMultiCell())
    return getInstance(elements.freeze(), isMultiCell);
  return getInstance(elements.freezeNestedMulticellTypes(), isMultiCell);
}
origin: org.apache.cassandra/cassandra-all

@Override
public AbstractType<?> freeze()
{
  if (isMultiCell)
    return getInstance(this.elements, false);
  else
    return this;
}
origin: jsevellec/cassandra-unit

  return listType.compose(foundValue).contains(listType.getElementsType().compose(value));
case SET:
  SetType<?> setType = (SetType<?>)type;
origin: org.apache.cassandra/cassandra-all

@Override
public int compareCustom(ByteBuffer o1, ByteBuffer o2)
{
  return compareListOrSet(elements, o1, o2);
}
origin: jsevellec/cassandra-unit

  @Override
  public String toJSONString(ByteBuffer buffer, ProtocolVersion protocolVersion)
  {
    return setOrListToJsonString(buffer, elements, protocolVersion);
  }
}
org.apache.cassandra.db.marshalListType

Most used methods

  • getElementsType
  • getInstance
  • getSerializer
  • <init>
  • compareListOrSet
  • compose
  • isMultiCell
  • setOrListToJsonString
  • decompose
  • toString
  • valueComparator
  • valueComparator

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Runner (org.openjdk.jmh.runner)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now