Package com.alvazan.orm.api.z5api

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


  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


  private Holder<IndexColumnInfo> fetchPreviousFromCache() {
    if(cachedIter == null)
      return null;
    else if(!cachedIter.hasPrevious())
      return null;
    IndexColumnInfo prev = cachedIter.previous();
    return new Holder<IndexColumnInfo>(prev.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

      //  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

    Assert.assertEquals("act1", typedRow.getRowKeyString());
  }
 
  private void compareKeys2(Cursor<IndexColumnInfo> cursor, ViewInfo viewAct,
      String expectedKey) {
    IndexColumnInfo info = cursor.getCurrent();
    IndexPoint keyForActivity = info.getKeyForView(viewAct);
    String key = keyForActivity.getKeyAsString();
    Assert.assertEquals(expectedKey, key);
  }
View Full Code Here

      Assert.assertEquals("act7", typedRow2.getRowKeyString());
      Assert.assertEquals("acc1", theJoinedRow2.getRowKey());
  }
 
  private void compareKeys(Cursor<IndexColumnInfo> cursor, ViewInfo viewAct, ViewInfo viewAcc, String expectedKey, String expectedAccKey) {
    IndexColumnInfo info = cursor.getCurrent();
    IndexPoint keyForActivity = info.getKeyForView(viewAct);
    String key = keyForActivity.getKeyAsString();
   
    String keyAcc = null;
    if(expectedAccKey != null) {
      IndexPoint keyForAccount = info.getKeyForView(viewAcc);
      keyAcc = keyForAccount.getKeyAsString();
    }
   
    Assert.assertEquals(expectedKey, key);
    Assert.assertEquals(expectedAccKey, keyAcc);
View Full Code Here

  @Override
  public Holder<byte[]> nextImpl() {
    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" +
View Full Code Here

  @Override
  public Holder<byte[]> previousImpl() {
    Holder<IndexColumnInfo> prev = cursor.previousImpl();
    if(prev == null)
      return null;
    IndexColumnInfo info = prev.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" +
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

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.