Class PgViewResultSet

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Iterable<oracle.pgql.lang.ResultAccess>, PgqlResultSet, oracle.pgql.lang.ResultAccess, oracle.pgql.lang.ResultSet<oracle.pgql.lang.ResultAccess>

    public class PgViewResultSet
    extends oracle.pg.rdbms.pgql.PgqlResultSetImpl
    This class provides a ResultSet for a PGQL query execution. It uses a JDBC-style ResultSet approach for consuming the query result.
    • Constructor Summary

      Constructors 
      Constructor Description
      PgViewResultSet​(java.sql.ResultSet rs, java.sql.Statement stmt, int fetchSize, oracle.pg.rdbms.pgql.QueryContext ctx, PgqlExecution ope, long id, boolean closeStatement)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Boolean getBoolean​(int elementIdx)
      Gets the value of the designated element by element index as a Boolean
      java.lang.Boolean getBoolean​(java.lang.String elementName)
      Gets the value of the designated element by element name as a Boolean
      java.time.LocalDate getDate​(int columnIdx)
      Retrieves the value of the designated column in the current row as a LocalDate
      java.time.LocalDate getDate​(java.lang.String columnName)
      Retrieves the value of the designated column in the current row as a LocalDate
      java.lang.Double getDouble​(int elementIdx)
      Gets the value of the designated element by element index as a Double
      java.lang.Double getDouble​(java.lang.String elementName)
      Gets the value of the designated element by element name as a Double
      java.lang.Float getFloat​(int elementIdx)
      Gets the value of the designated element by element index as a Float
      java.lang.Float getFloat​(java.lang.String elementName)
      Gets the value of the designated element by element name as a Float
      java.lang.Integer getInteger​(int elementIdx)
      Gets the value of the designated element by element index as an Integer
      java.lang.Integer getInteger​(java.lang.String elementName)
      Gets the value of the designated element by element name as an Integer
      java.lang.Long getLong​(int elementIdx)
      Gets the value of the designated element by element index as a Long
      java.lang.Long getLong​(java.lang.String elementName)
      Gets the value of the designated element by element name as a Long
      oracle.pgql.lang.ResultSetMetaData getMetaData()
      Retrieves the number and properties of this ResultSet object's columns.
      java.lang.Object getObject​(int elementIdx)
      Gets the value of the designated element by element name as an Object
      java.lang.Object getObject​(java.lang.String elementName)
      Gets the value of the designated element by element name as an Object
      java.lang.String getString​(int elementIdx)
      Gets the value of the designated element by element index as a String
      java.lang.String getString​(java.lang.String elementName)
      Gets the value of the designated element by element name as a String
      java.time.LocalTime getTime​(int columnIdx)
      Retrieves the value of the designated column in the current row as a LocalTime
      java.time.LocalTime getTime​(java.lang.String columnName)
      Retrieves the value of the designated column in the current row as a LocalTime
      java.time.LocalDateTime getTimestamp​(int columnIdx)
      Retrieves the value of the designated column in the current row as a LocalDateTime
      java.time.LocalDateTime getTimestamp​(java.lang.String columnName)
      Retrieves the value of the designated column in the current row as a LocalDateTime
      java.time.OffsetDateTime getTimestampWithTimezone​(int elementIdx)
      Gets the value of the designated element by element index as an OffsetDateTime
      java.time.OffsetDateTime getTimestampWithTimezone​(java.lang.String elementName)
      Gets the value of the designated element by element name as an OffsetDateTime
      java.time.OffsetTime getTimeWithTimezone​(int columnIdx)
      Retrieves the value of the designated column in the current row as an OffsetTime
      java.time.OffsetTime getTimeWithTimezone​(java.lang.String columnName)
      Retrieves the value of the designated column in the current row as an OffsetTime
      int getValueType​(int elementIdx)
      Returns the type of value for the given element.
      int getValueType​(java.lang.String elementName)
      Returns the type of value for the given element.
      • Methods inherited from class oracle.pg.rdbms.pgql.PgqlResultSetImpl

        absolute, afterLast, beforeFirst, close, first, getLegacyDate, getLegacyDate, getList, getList, getVertexLabels, getVertexLabels, iterator, last, next, previous, print, print, relative
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • PgViewResultSet

        public PgViewResultSet​(java.sql.ResultSet rs,
                               java.sql.Statement stmt,
                               int fetchSize,
                               oracle.pg.rdbms.pgql.QueryContext ctx,
                               PgqlExecution ope,
                               long id,
                               boolean closeStatement)
                        throws java.sql.SQLException
        Constructor
        Parameters:
        rs - JDBC ResultSet object for the SQL translation of this PGQL query
        stmt - JDBC Statement used to create this result set
        fetchSize - the fetch size to use for the result set
        ctx - the context for this query (flags, etc.)
        ope - the PgqlExecution object that generated this result set
        id - the id for this result set
        closeStatement - true if JDBC Statement should be closed in close method, false otherwise
        Throws:
        java.sql.SQLException - if a database access error occurs
    • Method Detail

      • getMetaData

        public oracle.pgql.lang.ResultSetMetaData getMetaData()
        Retrieves the number and properties of this ResultSet object's columns.
        Returns:
        the description of this ResultSet object's columns
      • getObject

        public java.lang.Object getObject​(int elementIdx)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as an Object
        Parameters:
        elementIdx - element index
        Returns:
        Object
        Throws:
        oracle.pgql.lang.PgqlException
      • getObject

        public java.lang.Object getObject​(java.lang.String elementName)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as an Object
        Parameters:
        elementName - element name
        Returns:
        Object
        Throws:
        oracle.pgql.lang.PgqlException
      • getString

        public java.lang.String getString​(int elementIdx)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as a String
        Parameters:
        elementIdx - element index
        Returns:
        String
        Throws:
        oracle.pgql.lang.PgqlException
      • getString

        public java.lang.String getString​(java.lang.String elementName)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as a String
        Parameters:
        elementName - element name
        Returns:
        String
        Throws:
        oracle.pgql.lang.PgqlException
      • getInteger

        public java.lang.Integer getInteger​(int elementIdx)
                                     throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as an Integer
        Parameters:
        elementIdx - element index
        Returns:
        Integer
        Throws:
        oracle.pgql.lang.PgqlException
      • getInteger

        public java.lang.Integer getInteger​(java.lang.String elementName)
                                     throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as an Integer
        Parameters:
        elementName - element name
        Returns:
        Integer
        Throws:
        oracle.pgql.lang.PgqlException
      • getLong

        public java.lang.Long getLong​(int elementIdx)
                               throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as a Long
        Parameters:
        elementIdx - element index
        Returns:
        Long
        Throws:
        oracle.pgql.lang.PgqlException
      • getLong

        public java.lang.Long getLong​(java.lang.String elementName)
                               throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as a Long
        Parameters:
        elementName - element name
        Returns:
        Long
        Throws:
        oracle.pgql.lang.PgqlException
      • getFloat

        public java.lang.Float getFloat​(int elementIdx)
                                 throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as a Float
        Parameters:
        elementIdx - element index
        Returns:
        Float
        Throws:
        oracle.pgql.lang.PgqlException
      • getFloat

        public java.lang.Float getFloat​(java.lang.String elementName)
                                 throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as a Float
        Parameters:
        elementName - element name
        Returns:
        Float
        Throws:
        oracle.pgql.lang.PgqlException
      • getDouble

        public java.lang.Double getDouble​(int elementIdx)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as a Double
        Parameters:
        elementIdx - element index
        Returns:
        Double
        Throws:
        oracle.pgql.lang.PgqlException
      • getDouble

        public java.lang.Double getDouble​(java.lang.String elementName)
                                   throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as a Double
        Parameters:
        elementName - element name
        Returns:
        Double
        Throws:
        oracle.pgql.lang.PgqlException
      • getBoolean

        public java.lang.Boolean getBoolean​(int elementIdx)
                                     throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as a Boolean
        Parameters:
        elementIdx - element index
        Returns:
        Boolean
        Throws:
        oracle.pgql.lang.PgqlException
      • getBoolean

        public java.lang.Boolean getBoolean​(java.lang.String elementName)
                                     throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as a Boolean
        Parameters:
        elementName - element name
        Returns:
        Boolean
        Throws:
        oracle.pgql.lang.PgqlException
      • getDate

        public java.time.LocalDate getDate​(int columnIdx)
                                    throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalDate
        Specified by:
        getDate in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getDate in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnIdx - column index
        Returns:
        LocalDate
        Throws:
        oracle.pgql.lang.PgqlException
      • getDate

        public java.time.LocalDate getDate​(java.lang.String columnName)
                                    throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalDate
        Specified by:
        getDate in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getDate in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnName - column name
        Returns:
        LocalDate
        Throws:
        oracle.pgql.lang.PgqlException
      • getTime

        public java.time.LocalTime getTime​(int columnIdx)
                                    throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalTime
        Specified by:
        getTime in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTime in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnIdx - column index
        Returns:
        LocalTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTime

        public java.time.LocalTime getTime​(java.lang.String columnName)
                                    throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalTime
        Specified by:
        getTime in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTime in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnName - column name
        Returns:
        LocalTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimestamp

        public java.time.LocalDateTime getTimestamp​(int columnIdx)
                                             throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalDateTime
        Specified by:
        getTimestamp in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTimestamp in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnIdx - column index
        Returns:
        LocalDateTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimestamp

        public java.time.LocalDateTime getTimestamp​(java.lang.String columnName)
                                             throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as a LocalDateTime
        Specified by:
        getTimestamp in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTimestamp in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnName - column name
        Returns:
        LocalDateTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimeWithTimezone

        public java.time.OffsetTime getTimeWithTimezone​(int columnIdx)
                                                 throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as an OffsetTime
        Specified by:
        getTimeWithTimezone in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTimeWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnIdx - column index
        Returns:
        OffsetTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimeWithTimezone

        public java.time.OffsetTime getTimeWithTimezone​(java.lang.String columnName)
                                                 throws oracle.pgql.lang.PgqlException
        Retrieves the value of the designated column in the current row as an OffsetTime
        Specified by:
        getTimeWithTimezone in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTimeWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        columnName - column name
        Returns:
        OffsetTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimestampWithTimezone

        public java.time.OffsetDateTime getTimestampWithTimezone​(int elementIdx)
                                                          throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element index as an OffsetDateTime
        Specified by:
        getTimestampWithTimezone in interface oracle.pgql.lang.ResultAccess
        Overrides:
        getTimestampWithTimezone in class oracle.pg.rdbms.pgql.PgqlResultSetImpl
        Parameters:
        elementIdx - element index
        Returns:
        OffsetDateTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getTimestampWithTimezone

        public java.time.OffsetDateTime getTimestampWithTimezone​(java.lang.String elementName)
                                                          throws oracle.pgql.lang.PgqlException
        Gets the value of the designated element by element name as an OffsetDateTime
        Parameters:
        elementName - element name
        Returns:
        OffsetDateTime
        Throws:
        oracle.pgql.lang.PgqlException
      • getValueType

        public int getValueType​(int elementIdx)
                         throws oracle.pgql.lang.PgqlException
        Description copied from interface: PgqlResultSet
        Returns the type of value for the given element. The returned values correspond to values in the T column of the PG relational schema.
        Parameters:
        elementIdx - element index
        Returns:
        the type of value
        Throws:
        oracle.pgql.lang.PgqlException - when an error occurs while retrieving the value type
      • getValueType

        public int getValueType​(java.lang.String elementName)
                         throws oracle.pgql.lang.PgqlException
        Description copied from interface: PgqlResultSet
        Returns the type of value for the given element. The returned values correspond to values in the T column of the PG relational schema.
        Parameters:
        elementName - element name
        Returns:
        the type of value
        Throws:
        oracle.pgql.lang.PgqlException - when an error occurs while retrieving the value type