Package com.alvazan.orm.api.exc

Examples of com.alvazan.orm.api.exc.RowNotFoundException


    }
  }
 
  private List<T> getEntities(AbstractCursor<KeyValue<T>> all, List<T> foundElements, int firstResult, Integer maxResults){
    List<T> entities = new ArrayList<T>();
    RowNotFoundException exc = null;
   
    int counter = 0;
    while(true) {
      Holder<KeyValue<T>> holder = all.nextImpl();
      if(holder == null)
View Full Code Here


    rowKeys.add(virtKey);

    AbstractCursor<KeyValue<Row>> rows = session.find(metaDbo, new IterableWrappingCursor<byte[]>(rowKeys), false, true, null);
    Holder<KeyValue<Row>> holder = rows.nextImpl();
    if(holder == null)
      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

    rowKeys.add(virtKey);

    AbstractCursor<KeyValue<Row>> rows = session.find(metaDbo, new IterableWrappingCursor<byte[]>(rowKeys), false, true, null);
    Holder<KeyValue<Row>> holder = rows.nextImpl();
    if(holder == null)
      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

    }
  }
 
  private List<T> getEntities(AbstractCursor<KeyValue<T>> all, List<T> foundElements, int firstResult, Integer maxResults){
    List<T> entities = new ArrayList<T>();
    RowNotFoundException exc = null;
   
    int counter = 0;
    while(true) {
      Holder<KeyValue<T>> holder = all.nextImpl();
      if(holder == null)
View Full Code Here

        Object theId = metaLayer.convertIdFromString(clazz, idStr);
       
        //Read the entity in so that this entity is used instead...
      Object o = em.find(clazz, theId);
      if(o == null)
        throw new RowNotFoundException("Row with rowkey="+theId+" was not found, but your page posted this id to lookup the row of class type="+clazz.getSimpleName());
      return NoSqlModel.edit(rootParamNode, name, o, annotations);
    }
View Full Code Here

    if(row == null) {
      byte[] notVirtKey = idField.unformVirtRowKey(virtualKey);
      T key = (T) idField.convertFromStorage2(notVirtKey);
      keyVal = new KeyValue<TypedRow>();
      keyVal.setKey(key);
      RowNotFoundException exc = new RowNotFoundException("Your query="+query+" contained a value with a pk where that entity no longer exists in the nosql store");
      keyVal.setException(exc);
    } else {
      keyVal = meta.translateFromRow(row);
    }
   
View Full Code Here

  public void setKey(Object key) {
    this.key = key;
  }
  public T getValue() {
    if(e != null)
      throw new RowNotFoundException("Row was referenced in index, but not found in nosql store.  key="+key, e);
    return value;
  }
View Full Code Here

    rowKeys.add(virtKey);

    AbstractCursor<KeyValue<Row>> rows = session.find(metaDbo, rowKeys, false, true, null);
    Holder<KeyValue<Row>> holder = rows.nextImpl();
    if(holder == null)
      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

      keyVal = new KeyValue<T>();
      MetaIdField idMeta = meta.getIdField();
      byte[] nonVirtKey = idMeta.unformVirtRowKey((byte[]) key);
      Object obj = meta.getIdField().translateFromBytes(nonVirtKey);
      if(query != null) {
        RowNotFoundException exc = new RowNotFoundException("Your query="+query+" contained a value with a pk where that entity no longer exists in the nosql store");
        keyVal.setException(exc);
      }
      keyVal.setKey(obj);
    } else {
      keyVal = meta.translateFromRow(row, session);
View Full Code Here

    }
  }
 
  private List<T> getEntities(AbstractCursor<KeyValue<T>> all, List<T> foundElements, int firstResult, Integer maxResults){
    List<T> entities = new ArrayList<T>();
    RowNotFoundException exc = null;
   
    int counter = 0;
    while(true) {
      Holder<KeyValue<T>> holder = all.nextImpl();
      if(holder == null)
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.exc.RowNotFoundException

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.