Package com.alvazan.orm.api.z8spi

Source Code of com.alvazan.orm.api.z8spi.KeyValue

package com.alvazan.orm.api.z8spi;

import com.alvazan.orm.api.exc.RowNotFoundException;


public class KeyValue<T> {

  private Object key;
  private T value;
 
  private RowNotFoundException e;
 
  public Object getKey() {
    return key;
  }
  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;
  }
  public void setValue(T value) {
    this.value = value;
  }
  public void setException(RowNotFoundException exc) {
    this.e = exc;
  }
  public RowNotFoundException getException() {
    return e;
  }
}
TOP

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

TOP
Copyright © 2018 www.massapi.com. 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.