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

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


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


  /* (non-Javadoc)
   * @see com.alvazan.orm.layer3.spi.db.inmemory.RowTemp#getColumn(byte[])
   */
  @Override
  public Column getColumn(byte[] key) {
    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);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.alvazan.orm.layer3.spi.db.inmemory.RowTemp#remove(byte[])
   */
  @Override
  public void remove(byte[] name) {
    ByteArray key = new ByteArray(name);
    columns.remove(key);
  }
View Full Code Here

    throw new UnsupportedOperationException("bug, this is not an index row");
  }
  public Collection<Column> columnSlice(byte[] from, byte[] to) {
    NavigableMap<ByteArray, Column> map = columns;
    if(from != null) {
      ByteArray fromArray = new ByteArray(from);
      map = columns.tailMap(fromArray, true);
    }
   
    if(to != null) {
      ByteArray toArray = new ByteArray(to);
      map = map.headMap(toArray, true);
    }

    List<Column> list = deepCopy(map.values());
   
View Full Code Here

  }

  @Override
  public void addColumns(List<Column> cols) {
    for(Column c : cols) {
      ByteArray b = new ByteArray(c.getName());
      columns.put(b, c);
    }
  }
View Full Code Here

  }

  @Override
  public void removeColumns(Collection<byte[]> columnNames) {
    for(byte[] k : columnNames) {
      ByteArray b = new ByteArray(k);
      columns.remove(b);
    }
  }
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

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.