Class Result<T>

java.lang.Object
net.sf.persism.Result<T>

public final class Result<T> extends Object
Result of an insert, update or delete. Contains the rows affected returned by JDBC and the original copy of the data object.
  • Constructor Details

    • Result

      public Result(int rows, T dataObject)
      Parameters:
      rows - rows affected
      dataObject - possibly changed object after an insert. Use for Records which are immutable.
  • Method Details

    • rows

      public int rows()
      Return value from jdbc statement getUpdateCount after an insert.
      Returns:
      row count changed
    • dataObject

      public T dataObject()
      Instance of the possibly modified object after insert.
      Returns:
      dataObject of type T
    • toString

      public String toString()
      Overrides:
      toString in class Object