パッケージ org.nkjmlab.sorm4j

インタフェース TypedOrmReader<T>

  • 既知のサブインタフェースのリスト:
    TypedOrmConnection<T>
    既知の実装クラスのリスト:
    TypedOrmConnectionImpl

    public interface TypedOrmReader<T>
    The typed interface of reading functions of object-relation mapping.
    作成者:
    nkjm
    • メソッドの詳細

      • readAll

        List<T> readAll()
        Reads all rows from the table indicated by object class.
        戻り値:
      • readAllLazy

        LazyResultSet<T> readAllLazy()
        Returns LazyResultSet represents all rows from the table indicated by object class.
        戻り値:
      • readByPrimaryKey

        T readByPrimaryKey​(Object... primaryKeyValues)
        Reads an object by its primary keys from the table indicated by object class.
        パラメータ:
        primaryKeyValues -
        戻り値:
      • readFirst

        T readFirst​(SqlStatement sql)
        Reads an object from the database.
        パラメータ:
        sql -
        戻り値:
      • readFirst

        T readFirst​(String sql,
                    Object... parameters)
        Reads an object from the database.
        パラメータ:
        sql -
        parameters -
        戻り値:
      • readLazy

        LazyResultSet<T> readLazy​(String sql,
                                  Object... parameters)
        Returns an LazyResultSet. It is able to convert to Stream, List, and so on.
        パラメータ:
        sql -
        parameters -
        戻り値:
      • readList

        List<T> readList​(SqlStatement sql)
        Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.
        パラメータ:
        sql -
        戻り値:
      • readList

        List<T> readList​(String sql,
                         Object... parameters)
        Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.

        Parameters will be set according with the correspondence defined in SqlParameterSetter.setParameters(PreparedStatement, Object[])

        パラメータ:
        sql -
        parameters -
        戻り値:
      • readOne

        T readOne​(SqlStatement sql)
        Reads only one object from the database.
        パラメータ:
        sql -
        戻り値:
      • readOne

        T readOne​(String sql,
                  Object... parameters)
        Reads only one object from the database.
        パラメータ:
        sql -
        parameters -
        戻り値: