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

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


    this.columnSortType = sortType;
    this.columnFamilyName = columnFamily;
  }

  public Row findOrCreateRow(byte[] key) {
    ByteArray array = new ByteArray(key);
    Row row = keyToRow.get(array);
    if(row == null) {
      row = createSortedMap();
      row.setKey(key);
      keyToRow.put(new ByteArray(key), row);
    }
    return row;
  }
View Full Code Here


   
    return row;
  }

  public void removeRow(byte[] rowKey) {
    ByteArray key = new ByteArray(rowKey);
    keyToRow.remove(key);
  }
View Full Code Here

    ByteArray key = new ByteArray(rowKey);
    keyToRow.remove(key);
  }

  public Row getRow(byte[] rowKey) {
    ByteArray key = new ByteArray(rowKey);
    Row row = keyToRow.get(key);
    if (row instanceof RowImpl) {
      if (((RowImpl) row).isExpired()) {
        keyToRow.remove(key);
        return null;
View Full Code Here

  @Override
  public String toString() {
    String t = "";
    t += "columnFamilyName="+columnFamilyName+" columnSortType="+columnSortType;
    for(Row r : keyToRow.values()) {
      ByteArray b = new ByteArray(r.getKey());
      t += "\nrowkey="+b.asString()+" row="+r;
    }
    return t;
  }
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

      return false;*/
  }

  @Override
  public String toString() {
    return "rowKey="+new ByteArray(key)+" columns="+columns;
  }
View Full Code Here

   */
  @Override
  public Column getColumn(byte[] key) {
    if (isExpired())
      return null;
    ByteArray bKey = new ByteArray(key);
    return columns.get(bKey);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.alvazan.orm.layer3.spi.db.inmemory.RowTemp#put(byte[], com.alvazan.orm.api.spi3.db.Column)
   */
  @Override
  public void put(Column col) {
    ByteArray key = new ByteArray(col.getName());
    columns.put(key, col);
    updateExpire(col);
  }
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.