Package com.datastax.driver.core

Examples of com.datastax.driver.core.ColumnDefinitions


    }

    public <T> T mapRowToEntityWithPrimaryKey(EntityMeta meta, Row row, Map<String, PropertyMeta> propertiesMap, EntityState entityState) {
        log.debug("Map CQL row to entity of class {}", meta.getClassName());
        T entity = null;
        ColumnDefinitions columnDefinitions = row.getColumnDefinitions();
        if (columnDefinitions != null) {
            entity = meta.forOperations().instanciate();
            for (Definition column : columnDefinitions) {
                String columnName = column.getName();
                PropertyMeta pm = propertiesMap.get(columnName);
View Full Code Here


        while (rowIter.hasNext())
        {
            Object entity = null;
            Row row = rowIter.next();
            ColumnDefinitions columnDefs = row.getColumnDefinitions();
            Iterator<Definition> columnDefIter = columnDefs.iterator();

            entity = iteratorColumns(metadata, metaModel, entityType, relationalValues, entity, row, columnDefIter);

            if (entity != null && entity.getClass().isAssignableFrom(metadata.getEntityClazz()))
            {
View Full Code Here

            ResultSet rSet = this.execute(builder.toString(), null);

            Iterator<Row> rowIter = rSet.iterator();

            Row row = rowIter.next();
            ColumnDefinitions columnDefs = row.getColumnDefinitions();
            Iterator<Definition> columnDefIter = columnDefs.iterator();

            entity = iteratorColumns(metadata, metaModel, metaModel.entity(metadata.getEntityClazz()),
                    new HashMap<String, Object>(), entity, row, columnDefIter);
        }
    }
View Full Code Here

   * This constructor is meant to be called when we have a table with standard columns i.e no composites, just plain columns
   * @param row
   */
  public CqlColumnListImpl(Row row, ColumnFamily<?,?> cf) {
   
    ColumnDefinitions cfDefinitions = row.getColumnDefinitions();
   
    int index = 1; // skip the key column
    while (index < cfDefinitions.size()) {
      String columnName = cfDefinitions.getName(index);
      CqlColumnImpl<C> cqlCol = new CqlColumnImpl<C>((C) columnName, row, index);
      columnList.add(cqlCol);
      map.put((C) columnName, cqlCol);
      index+=3// skip past the ttl and the timestamp
    }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.ColumnDefinitions

Copyright © 2018 www.massapicom. 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.