Interface View<Q,O>

Type Parameters:
Q - Query
O - Object
All Known Subinterfaces:
AliasView<Q>, EntryView<Q>, UpdatingView<Q,O,ID>

public interface View<Q,O>
This interface sets general structure of getting objects from some source using query
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Retrieves all elements (like aliases for AliasView) of target object
    Note that client who calls this should close the result.
    retrieve(Q query)
    Note that client who calls this should close the result.
    Returns exactly one result, if ResultSet has zero or more throws an Exception
    uniqueResult(Q query)
    Returns exactly one result, if ResultSet has zero or more throws an Exception
  • Method Details

    • retrieve

      QueryResult<O> retrieve(Q query)
      Note that client who calls this should close the result.
    • retrieve

      QueryResult<O> retrieve(String query)
      Note that client who calls this should close the result.
    • uniqueResult

      O uniqueResult(Q query)
      Returns exactly one result, if ResultSet has zero or more throws an Exception
      Parameters:
      query - understandable to implementation query.
      Returns:
      query result
    • uniqueResult

      O uniqueResult(String query)
      Returns exactly one result, if ResultSet has zero or more throws an Exception
      Parameters:
      query - understandable to implementation query as a string
      Returns:
      query result
    • all

      Retrieves all elements (like aliases for AliasView) of target object
      Returns:
      objects as a collection