Class ResultRowBuilder

java.lang.Object
com.atlassian.jira.database.ResultRowBuilder
All Implemented Interfaces:
Iterable<ResultRow>

public class ResultRowBuilder extends Object implements Iterable<ResultRow>
Helps you build a list of ResultRow objects for use in MockDbConnectionManager.
Since:
v6.4.4
See Also:
  • Constructor Details

    • ResultRowBuilder

      public ResultRowBuilder()
  • Method Details

    • add

      public ResultRowBuilder add(@Nonnull ResultRow row)
      Add the given row to the results.

      It will usually be more convenient to use addRow(Object...).

      Parameters:
      row - the row to add to the results
      Returns:
      this builder
    • addRow

      public ResultRowBuilder addRow(Object... values)
      Add a row with the given list of column values.

      Only a partial list of values is required - missing values are treated as NULL

      Parameters:
      values - a (partial) list of column values
      Returns:
      this builder
    • toList

      public List<ResultRow> toList()
    • iterator

      public Iterator<ResultRow> iterator()
      Specified by:
      iterator in interface Iterable<ResultRow>
    • toString

      public String toString()
      Overrides:
      toString in class Object