Package com.alvazan.orm.api.z5api

Examples of com.alvazan.orm.api.z5api.IndexColumnInfo


      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


  private Holder<IndexColumnInfo> fetchFromCache() {
    if(cachedIter == null)
      return null;
    else if(!cachedIter.hasNext())
      return null;
    IndexColumnInfo next = cachedIter.next();
    return new Holder<IndexColumnInfo>(next.copy());
  }
View Full Code Here

      //  rightResultsExhausted = true;
        break;
      } else if(batchSize != null && batchSize.intValue() < counter)
        break;
     
      IndexColumnInfo rightResult = rightHolder.getValue();
      ByteArray pk = rightResult.getPrimaryKey(rightView);
      values.add(pk.getKey());
      rightListResults.add(rightResult);
      counter++;
    }
   
View Full Code Here

  }

  private Holder<IndexColumnInfo> createResult(
      com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<IndexColumn> next) {
    IndexColumn indCol = next.getValue();
    IndexColumnInfo info = new IndexColumnInfo();   
   
    if(cachedFromRightResults.hasNext()) {
      //We need to compare lastCachedRightSide with our incoming to make see if they pair up
      //or else move to the next right side answer.
      ByteArray pkOfRightView = lastCachedRightSide.getPrimaryKey(rightView);
      ByteArray valueOfLeft = new ByteArray(indCol.getIndexedValue());
      if(!valueOfLeft.equals(pkOfRightView)) {
        lastCachedRightSide = cachedFromRightResults.next();
      }   
 
      info.mergeResults(lastCachedRightSide);
    }
   
    info.putIndexNode(newView, indCol, colMeta);
    return new Holder<IndexColumnInfo>(info);
  }
View Full Code Here

  public Holder<IndexColumnInfo> nextImpl() {
    while(true) {
      Holder<IndexColumnInfo> nextFromCursor = leftResults.nextImpl();
      if(nextFromCursor == null)
        break;
      IndexColumnInfo next = nextFromCursor.getValue();

      if(cachedMap != null) {
        Holder<IndexColumnInfo> result = quickHashLookup(next);
        if(result != null)
          return result;
View Full Code Here

    Holder<IndexColumnInfo> matchedResult = null;
    while(true) {
      Holder<IndexColumnInfo> nextFromCursor = rightResults.nextImpl();
      if(nextFromCursor == null)
        break;
      IndexColumnInfo andedInfo = nextFromCursor.getValue();
      ByteArray key1 = next.getPrimaryKey(leftView);
      ByteArray key2 = andedInfo.getPrimaryKey(rightView);
      if(pkToRightSide.size() < 500)
        pkToRightSide.put(key2, andedInfo);
      if(matchedResult == null && key1.equals(key2)) {
        next.mergeResults(andedInfo);
        matchedResult = new Holder<IndexColumnInfo>(next);
View Full Code Here

    return matchedResult;
  }

  private Holder<IndexColumnInfo> quickHashLookup(IndexColumnInfo next) {
    ByteArray key1 = next.getPrimaryKey(leftView);
    IndexColumnInfo andedInfo = cachedMap.get(key1);
    if(andedInfo == null)
      return null;
    next.mergeResults(andedInfo);
    return new Holder<IndexColumnInfo>(next);
  }
View Full Code Here

  private Holder<IndexColumnInfo> runInnerLoop(IndexColumnInfo next) {
    while(true) {
      Holder<IndexColumnInfo> nextFromCursor = rightResults.nextImpl();
      if(nextFromCursor == null)
        break;
      IndexColumnInfo andedInfo = nextFromCursor.getValue();
      ByteArray key1 = next.getPrimaryKey(leftView);
      ByteArray key2 = andedInfo.getPrimaryKey(rightView);
      if(key1.equals(key2)) {
        next.mergeResults(andedInfo);
        return new Holder<IndexColumnInfo>(next);
      }
    }
View Full Code Here

    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

      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

TOP

Related Classes of com.alvazan.orm.api.z5api.IndexColumnInfo

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.