congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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