Package com.alvazan.orm.api.z8spi.conv

Examples of com.alvazan.orm.api.z8spi.conv.ByteArray


    private String colFamily;
    private ByteArray key;
   
    public TheKey(String cf, byte[] key) {
      colFamily = cf;
      this.key = new ByteArray(key);
    }
View Full Code Here


        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

    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);
    }
View Full Code Here

    this.session = session;
  }

  @Override
  public void setParameter(String parameterName, byte[] value) {
    ByteArray val = new ByteArray(value);
    parameters.put(parameterName, val);
  }
View Full Code Here

    ByteArray val = new ByteArray(value);
    parameters.put(parameterName, val);
  }

  private ByteArray getParameter(String parameterName) {
    ByteArray result = parameters.get(parameterName);
    if(result == null)
      throw new IllegalStateException("You did not call query.setParameter(\""+parameterName+"\", <yourvalue>) and that parameter is required");
    return result;
  }
View Full Code Here

    return info.convertToStorage2(constant);
  }

  private byte[] processParam(DboColumnMeta info, ExpressionNode node) {
    String paramName = (String) node.getState();
    ByteArray val = getParameter(paramName);
    return val.getKey();
  }
View Full Code Here

    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

      cachedMap = pkToRightSide;
    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

    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

    while(true) {
      Holder<IndexColumnInfo> nextFromLeftCursor = leftResults.nextImpl();
      if(nextFromLeftCursor == null)
        break;
      IndexColumnInfo leftResult = nextFromLeftCursor.getValue();
      ByteArray pk = leftResult.getPrimaryKey(leftView);
      pksToAlreadyFound.put(pk, leftResult);
      return new Holder<IndexColumnInfo>(leftResult);
    }
   
    //NOW, as we go through the results on the right side, make sure we filter out
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.conv.ByteArray

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.