Package com.alvazan.orm.api.z8spi.action

Examples of com.alvazan.orm.api.z8spi.action.IndexColumn


  }

  public static IndexColumn convertToIndexCol(com.netflix.astyanax.model.Column<byte[]> col) {
    Object colName = col.getName();
    GenericComposite bigDec = (GenericComposite)colName;
    IndexColumn c = new IndexColumn();
    c.setPrimaryKey(bigDec.getPk());
    c.setIndexedValue(bigDec.getIndexedValue());
    c.setValue(col.getByteArrayValue());
    return c;
  }
View Full Code Here


    ScanInfo info = ScanInfo.createScanInfo(colMeta, partitionBy, partitionId);
    byte[] rowKey = info.getRowKey();
    String indColFamily = info.getIndexColFamily();
    DboTableMeta cf = info.getEntityColFamily();
   
    IndexColumn col = new IndexColumn();
    col.setIndexedValue(pt.getRawIndexedValue());
    col.setPrimaryKey(pt.getRawKey());
    session.removeFromIndex(cf, indColFamily, rowKey, col);
  }
View Full Code Here

    ScanInfo info = ScanInfo.createScanInfo(colMeta, partitionBy, partitionId);
    byte[] rowKey = info.getRowKey();
    String indColFamily = info.getIndexColFamily();
    DboTableMeta cf = info.getEntityColFamily();
   
    IndexColumn col = new IndexColumn();
    col.setIndexedValue(pt.getRawIndexedValue());
    col.setPrimaryKey(pt.getRawKey());
    session.persistIndex(cf, indColFamily, rowKey, col);
  }
View Full Code Here

    keyList = new ArrayList<byte[]>();
    while(true) {
      Holder<IndexColumn> holder = cursor.nextImpl();
      if(holder == null)
        break;
      IndexColumn val = holder.getValue();
      //NOTE: Here the indCol.getPrimaryKey is our owning entities primary key
      // and the indexedValue is the actual foreign key to the other table
      byte[] indexedValue = val.getIndexedValue();
      keyList.add(indexedValue);
      T proxy = convertIdToProxy(indexedValue, session);
      proxyList.add(proxy);
      if(proxyList.size() > batchSize)
        break;
View Full Code Here

  @Override
  public Holder<IndexColumnInfo> nextImpl() {
    Holder<IndexColumn> holder = cursor.nextImpl();
    if(holder == null)
      return null;
    IndexColumn indCol = holder.getValue();
    if(indCol == null)
      return new Holder<IndexColumnInfo>(null);
    IndexColumnInfo info = new IndexColumnInfo();
    info.putIndexNode(viewInfo, indCol, colMeta);
    return new Holder<IndexColumnInfo>(info);
View Full Code Here

    if(holder == null)
      return null;
    KeyValue<Row> pkCol = holder.getValue();
    if(pkCol == null || pkCol.getValue() == null)
      return null;
    IndexColumn c = new IndexColumn();
    c.setPrimaryKey(colMeta.getOwner().getIdColumnMeta().unformVirtRowKey(pkCol.getValue().getKey()));
    c.setIndexedValue(colMeta.getOwner().getIdColumnMeta().unformVirtRowKey(pkCol.getValue().getKey()));
    c.setValue(pkCol.getValue().getKey());
    IndexColumnInfo info = new IndexColumnInfo();
    info.putIndexNode(viewInfo, c, colMeta);
    return new Holder<IndexColumnInfo>(info);
  }
View Full Code Here

    String colFamily = getMetaDbo().getIndexTableName();
    String rowKey = formRowKey(row.getKey());
   
    data.setColumnFamilyName(colFamily);
    data.setRowKey(rowKey);
    IndexColumn indCol = data.getIndexColumn();
    indCol.setIndexedValue(byteVal);
    indCol.setPrimaryKey(key);
    return data;
  }
View Full Code Here

      Holder<IndexColumnInfo> next = cursor.nextImpl();
      if(next == null)
        return null;
      IndexColumnInfo info = next.getValue();
      Wrapper wrapper = info.getIndexNode(view);
      IndexColumn indNode = wrapper.getCol();
      byte[] key = indNode.getPrimaryKey();
      if(key == null)
        throw new IllegalArgumentException("key was null, index data seems corrupt on view="+view+" col="
            +wrapper.getColMeta()+" some value is tied to a null primary key.  Should" +
                " never happen even in face of eventual consistent, should never happen");
      return new IterHolder<byte[]>(key);
View Full Code Here

  public Holder<IndexPoint> nextImpl() {
    Holder<IndexColumn> next = indCol.nextImpl();
    if(next == null)
      return null;
   
    IndexColumn col = next.getValue();
    IndexPoint p = new IndexPoint(idMeta, col, valueMeta);
    return new Holder<IndexPoint>(p);
  }
View Full Code Here

    keyList = new ArrayList<byte[]>();
    while(true) {
      Holder<IndexColumn> holder = cursor.nextImpl();
      if(holder == null)
        break;
      IndexColumn val = holder.getValue();
      //NOTE: Here the indCol.getPrimaryKey is our owning entities primary key
      // and the indexedValue is the actual foreign key to the other table
      byte[] indexedValue = val.getIndexedValue();
      keyList.add(indexedValue);
      T proxy = convertIdToProxy(indexedValue, session);
      proxyList.add(proxy);
      if(proxyList.size() > batchSize)
        break;
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.action.IndexColumn

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.