Package com.alvazan.orm.api.z8spi

Examples of com.alvazan.orm.api.z8spi.Row


    return new Holder<KeyValue<T>>(result);
  }
 
  @SuppressWarnings("rawtypes")
  private KeyValue<T> translateRow(KeyValue<Row> kv) {
    Row row = kv.getValue();
    Object key = kv.getKey();
   
    KeyValue<T> keyVal;
    if(row == null) {
      keyVal = new KeyValue<T>();
View Full Code Here


      if(holder == null)
        break;
      KeyValue<Row> kv = holder.getValue();
      byte[] key = (byte[]) kv.getKey();
      byte[] nonVirtKey = idMeta.unformVirtRowKey(key);
      Row row = kv.getValue();
      Tuple<T> tuple = metaClass.convertIdToProxy(row, session, nonVirtKey, null);
      if(row == null) {
        throw new IllegalStateException("This entity is corrupt(your entity='"+owner+"') and contains a" +
            " reference/FK to a row that does not exist in another table.  " +
            "It refers to another entity with pk="+tuple.getEntityId()+" which does not exist");
View Full Code Here

      com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder = rows.nextImpl();
      if(holder == null)
        break;
      KeyValue<Row> kv = holder.getValue();
      byte[] key = (byte[]) kv.getKey();
      Row row = kv.getValue();
      Tuple<T> tuple = proxyMeta.convertIdToProxy(row, session, key, null);
      if(row == null) {
        throw new IllegalStateException("This entity is corrupt(your entity='"+owner+"') and contains a" +
            " reference/FK to a row that does not exist in another table.  " +
            "It refers to another entity with pk="+tuple.getEntityId()+" which does not exist");
View Full Code Here

      if(holder == null)
        break;
      KeyValue<Row> kv = holder.getValue();
      byte[] key = (byte[]) kv.getKey();
      byte[] nonVirtKey = idMeta.unformVirtRowKey(key);
      Row row = kv.getValue();
      Tuple<V> tuple = classMeta.convertIdToProxy(row, session, nonVirtKey, null);
      if(row == null) {
        throw new IllegalStateException("This entity is corrupt(your entity='"+owner+"') and contains a" +
            " reference/FK to a row that does not exist in another table.  " +
            "It refers to another entity with pk="+tuple.getEntityId()+" which does not exist");
View Full Code Here

    RowHolder<Row> currentRow = fromCache(colFamily, rowKey);
    if(currentRow == null) {
      currentRow = new RowHolder<Row>(rowKey);
    }

    Row value = currentRow.getValue();
    if(value == null)
      value = rowProvider.get();
   
    value.setKey(rowKey);
    value.addColumns(columns);
    cacheRow(colFamily, rowKey, value);
  }
View Full Code Here

    session.remove(colFamily, rowKey, columnNames);
    RowHolder<Row> currentRow = fromCache(colFamily, rowKey);
    if(currentRow == null) {
      return;
    }
    Row value = currentRow.getValue();
    if(value == null) {
      return;
    }
   
    value.removeColumns(columnNames);
  }
View Full Code Here

  public Row find(DboTableMeta colFamily, byte[] rowKey) {
    RowHolder<Row> result = fromCache(colFamily, rowKey);
    if(result != null)
      return result.getValue(); //This may return the cached null value!!
   
    Row row = session.find(colFamily, rowKey);
    cacheRow(colFamily, rowKey, row);
    return row;
  }
View Full Code Here

      throw new RowNotFoundException("row for type="+classMeta.getMetaClass().getName()+" not found for key="+entityId);
    KeyValue<Row> next = holder.getValue();
    if(next.getValue() == null)
      throw new RowNotFoundException("row for type="+classMeta.getMetaClass().getName()+" not found for key="+entityId);
   
    Row row = next.getValue();
    classMeta.fillInInstance(row, session, self);
  }
View Full Code Here

      if(holder == null)
        break;
      KeyValue<Row> kv = holder.getValue();
      byte[] key = (byte[]) kv.getKey();
      byte[] nonVirtKey = idMeta.unformVirtRowKey(key);
      Row row = kv.getValue();
      Tuple<T> tuple = metaClass.convertIdToProxy(row, session, nonVirtKey, null);
      if(row == null) {
        if (!metaDbo.isEmbeddable())
        throw new IllegalStateException("This entity is corrupt(your entity='"+owner+"') and contains a" +
            " reference/FK to a row that does not exist in another table.  " +
View Full Code Here

      com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<KeyValue<Row>> holder = rows.nextImpl();
      if(holder == null)
        break;
      KeyValue<Row> kv = holder.getValue();
      byte[] key = (byte[]) kv.getKey();
      Row row = kv.getValue();
      Tuple<T> tuple = proxyMeta.convertIdToProxy(row, session, key, null);
      if(row == null) {
        throw new IllegalStateException("This entity is corrupt(your entity='"+owner+"') and contains a" +
            " reference/FK to a row that does not exist in another table.  " +
            "It refers to another entity with pk="+tuple.getEntityId()+" which does not exist");
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.Row

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.