Examples of CqlDataType


Examples of org.cyclop.model.CqlDataType

    if (partitionKey != null) {
      cqlPartitionKeyValue = extractor.extractPartitionKey(row, partitionKey);
    }

    Component component;
    CqlDataType dataType = column.dataType;
    if (dataType.name == DataType.Name.SET || dataType.name == DataType.Name.LIST) {
      component = createForCollection(row, cqlPartitionKeyValue, column, componentId);

    } else if (dataType.name == DataType.Name.MAP) {
      component = createForMap(row, cqlPartitionKeyValue, column, componentId);
View Full Code Here

Examples of org.cyclop.model.CqlDataType

  private void appendRow(PrintWriter out, Row row, List<CqlExtendedColumnName> cols) {
    LOG.debug("Appending next row");
    Iterator<CqlExtendedColumnName> it = cols.iterator();
    while (it.hasNext()) {
      CqlExtendedColumnName column = it.next();
      CqlDataType dataType = column.dataType;

      if (dataType.name == DataType.Name.SET || dataType.name == DataType.Name.LIST) {
        appendCollection(out, row, column);

      } else if (dataType.name == DataType.Name.MAP) {
View Full Code Here

Examples of org.cyclop.model.CqlDataType

  private final static Logger LOG = LoggerFactory.getLogger(DataExtractor.class);

  public @NotNull ImmutableList<CqlColumnValue> extractCollection(@NotNull Row row,
      @NotNull CqlExtendedColumnName column) {
    String partLc = column.partLc;
    CqlDataType dataType = column.dataType;
    if (dataType.name != DataType.Name.SET && dataType.name != DataType.Name.LIST) {
      throw new IllegalArgumentException("Only Collection type is supported");
    }

    if (dataType.keyClass == null) {
View Full Code Here

Examples of org.cyclop.model.CqlDataType

  }

  public @NotNull ImmutableMap<CqlColumnValue, CqlColumnValue> extractMap(@NotNull Row row,
      @NotNull CqlExtendedColumnName column) {
    String partLc = column.partLc;
    CqlDataType dataType = column.dataType;
    if (dataType.name != DataType.Name.MAP) {
      throw new IllegalArgumentException("Only Map type is supported");
    }

    if (dataType.keyClass == null || dataType.valueClass == null) {
View Full Code Here

Examples of org.cyclop.model.CqlDataType

    return key;
  }

  public @NotNull CqlColumnValue extractSingleValue(@NotNull Row row, @NotNull CqlExtendedColumnName column) {
    String partLc = column.partLc;
    CqlDataType dataType = column.dataType;
    if (dataType.isCollection()) {
      throw new IllegalArgumentException("Collection type is not supported");
    }

    Object extracted = null;
    if (dataType.isUUID()) {
      extracted = row.getUUID(partLc);

    } else if (dataType.isString()) {
      extracted = row.getString(partLc);

    } else if (dataType.isLong()) {
      extracted = row.getLong(partLc);

    } else if (dataType.name == DataType.cfloat().getName()) {
      extracted = row.getFloat(partLc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.