Coverage Summary for Class: Result (net.sf.persism)

Class Class, % Method, % Line, %
Result 100% (1/1) 75% (3/4) 83.3% (5/6)


1 package net.sf.persism; 2  3 /** 4  * Result of an insert 5  */ 6 public final class Result<T> { 7  private final int rows; 8  private final T dataObject; 9  10  /** 11  * 12  * @param rows rows affected 13  * @param dataObject possibly changed object after an insert. Use for Records which are immutable. 14  */ 15  public Result(int rows, T dataObject) { 16  this.rows = rows; 17  this.dataObject = dataObject; 18  } 19  20  /** 21  * Return value from jdbc statement getUpdateCount after an insert. 22  * @return row count changed 23  */ 24  public int rows() { 25  return rows; 26  } 27  28  /** 29  * Instance of the possibly modified object after insert. 30  * @return dataObject of type T 31  */ 32  public T dataObject() { 33  return dataObject; 34  } 35  36  @Override 37  public String toString() { 38  return "Result{" + 39  "rows=" + rows + 40  ", dataObject=" + dataObject + 41  '}'; 42  } 43 }