Package com.alvazan.orm.api.z8spi

Examples of com.alvazan.orm.api.z8spi.Row


      throw new RuntimeException("bug, unknown remove action="+action.getAction());
    }
  }

  private void removeColumns(Remove action, Table table) {
    Row row = table.getRow(action.getRowKey());
    if(row == null)
      return;
   
    for(byte[] name : action.getColumns()) {
      row.remove(name);
    }
  }
View Full Code Here


  private void removeColumn(RemoveColumn action, NoSqlEntityManager ormSession) {

    String colFamily = action.getColFamily().getColumnFamily();
    Table table = lookupColFamily(colFamily, (NoSqlEntityManager) ormSession);
    Row row = table.getRow(action.getRowKey());
    if(row == null)
      return;
    byte[] name = action.getColumn();
      row.remove(name);
  }
View Full Code Here

  }

  private void persist(Persist action, NoSqlEntityManager ormSession) {
    String colFamily = action.getColFamily().getColumnFamily();
    Table table = lookupColFamily(colFamily, (NoSqlEntityManager) ormSession);
    Row row = table.findOrCreateRow(action.getRowKey());
   
    for(Column col : action.getColumns()) {
      row.put(col.getName(), col.copy());
    }
  }
View Full Code Here

      byte[] from, byte[] to, Integer batchSize, BatchListener l) {
    Table table = database.findTable(colFamily.getColumnFamily());
    if(table == null) {
      return new HashSet<Column>();
    }
    Row row = table.findOrCreateRow(rowKey);
    if(row == null)
      return new HashSet<Column>();
   
    return row.columnSlice(from, to);
  }
View Full Code Here

    byte[] rowKey = info.getRowKey();
    Table table = database.findTable(colFamily);
    if(table == null) {
      return new HashSet<IndexColumn>();
    }
    Row row = table.findOrCreateRow(rowKey);
    if(row == null)
      return new HashSet<IndexColumn>();
   
    return row.columnSlice(from, to);
  }
View Full Code Here

        byte[] key = keyIter.next();
        ByteArray b = new ByteArray(key);
        KeyValue<Row> kv = map.get(b);
        finalRes.add(kv);       
      } else {
        Row row = r.getValue();
        KeyValue<Row> kv = new KeyValue<Row>();
        kv.setKey(r.getKey());
        kv.setValue(row);
        finalRes.add(kv);
      }
View Full Code Here

        byte[] key = keyIter.next();
        ByteArray b = new ByteArray(key);
        KeyValue<Row> kv = map.get(b);
        finalRes.add(kv);       
      } else {
        Row row = r.getValue();
        KeyValue<Row> kv = new KeyValue<Row>();
        kv.setKey(r.getKey());
        kv.setValue(row);
        finalRes.add(kv);
      }
View Full Code Here

    rowKeys.beforeFirst();
    Holder<byte[]> keyHolder = rowKeys.nextImpl();
    if (keyHolder != null) {
      byte[] key = keyHolder.getValue();
      while(key != null) {
        Row row = findRow(table, key);
        Row newRow = null;
        if(row != null)
          newRow = row.deepCopy();
        KeyValue<Row> kv = new KeyValue<Row>();
        kv.setKey(key);
        kv.setValue(newRow);
View Full Code Here

    rowKeys.afterLast();
    Holder<byte[]> keyHolder = rowKeys.previousImpl();
    if (keyHolder != null) {
      byte[] key = keyHolder.getValue();
      while(key != null) {
        Row row = findRow(table, key);
        Row newRow = null;
        if(row != null)
          newRow = row.deepCopy();
        KeyValue<Row> kv = new KeyValue<Row>();
        kv.setKey(key);
        kv.setValue(newRow);
View Full Code Here

    RowHolder<Row> currentRow = fromCache(colFamily, rowKey);
    if(currentRow == null) {
      currentRow = new RowHolder<Row>(rowKey);
    }

    Row value = currentRow.getValue();
    if(value == null)
      value = rowProvider.get();
   
    value.setKey(rowKey);
    value.addColumns(columns);
    cacheRow(colFamily, rowKey, value);
  }
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.Row

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.