Interface IQueryStatement


  • @StableMinor(version="17.0",
                 sinceVersion="4.0")
    public interface IQueryStatement
    Instances of this interface represents a statement that can be executed using this interface's method.
    Since:
    4.0.0
    Version:
    $Revision: 26587 $ $Date: 2024-08-26 21:09:17 -0300 (Mon, 26 Aug 2024) $
    • Method Detail

      • executeUpdate

        int executeUpdate()
                   throws PortalException
        Execute the update or delete query statement.
        Returns:
        The number of entities updated or deleted.
        Throws:
        PortalException
      • list

        java.util.List list()
                     throws PortalException
        Return the query results as a List. The results of each row are returned in an instance of Object[].
        Returns:
        the result list
        Throws:
        PortalException
      • getSingleResult

        java.lang.Object getSingleResult()
                                  throws PortalException
        Return a single instance that matches the query, or null if the query returns no results.
        Returns:
        the single result or null
        Throws:
        PortalException - if there is more than one matching result
      • setMaxResults

        IQueryStatement setMaxResults​(int maxResults)
        Set the maximum number of rows to retrieve. If not set, there is no limit to the number of rows retrieved.
        Parameters:
        maxResults - the maximum number of rows
      • setFirstResult

        IQueryStatement setFirstResult​(int firstResult)
        Set the first row to retrieve. If not set, rows will be retrieved beginning from row 0.
        Parameters:
        firstResult - a row number, numbered from 0