Class TextRowProtocol

    • Constructor Detail

      • TextRowProtocol

        public TextRowProtocol​(int maxFieldSize,
                               Options options)
        Constructor.
        Parameters:
        maxFieldSize - max field size
        options - connection options
    • Method Detail

      • setPosition

        public void setPosition​(int newIndex)
        Set length and pos indicator to asked index.
        Specified by:
        setPosition in class RowProtocol
        Parameters:
        newIndex - index (0 is first).
      • getInternalString

        public java.lang.String getInternalString​(ColumnDefinition columnInfo,
                                                  java.util.Calendar cal,
                                                  java.util.TimeZone timeZone)
                                           throws java.sql.SQLException
        Get String from raw text format.
        Specified by:
        getInternalString in class RowProtocol
        Parameters:
        columnInfo - column information
        cal - calendar
        timeZone - time zone
        Returns:
        String value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalInt

        public int getInternalInt​(ColumnDefinition columnInfo)
                           throws java.sql.SQLException
        Get int from raw text format.
        Specified by:
        getInternalInt in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        int value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion or not in Integer range
      • getInternalLong

        public long getInternalLong​(ColumnDefinition columnInfo)
                             throws java.sql.SQLException
        Get long from raw text format.
        Specified by:
        getInternalLong in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        long value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion or not in Long range (unsigned)
      • getInternalFloat

        public float getInternalFloat​(ColumnDefinition columnInfo)
                               throws java.sql.SQLException
        Get float from raw text format.
        Specified by:
        getInternalFloat in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        float value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion or not in Float range
      • getInternalDouble

        public double getInternalDouble​(ColumnDefinition columnInfo)
                                 throws java.sql.SQLException
        Get double from raw text format.
        Specified by:
        getInternalDouble in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        double value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion or not in Double range (unsigned)
      • getInternalBigDecimal

        public java.math.BigDecimal getInternalBigDecimal​(ColumnDefinition columnInfo)
        Get BigDecimal from raw text format.
        Specified by:
        getInternalBigDecimal in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        BigDecimal value
      • getInternalDate

        public java.sql.Date getInternalDate​(ColumnDefinition columnInfo,
                                             java.util.Calendar cal,
                                             java.util.TimeZone timeZone)
                                      throws java.sql.SQLException
        Get date from raw text format.
        Specified by:
        getInternalDate in class RowProtocol
        Parameters:
        columnInfo - column information
        cal - calendar
        timeZone - time zone
        Returns:
        date value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalTime

        public java.sql.Time getInternalTime​(ColumnDefinition columnInfo,
                                             java.util.Calendar cal,
                                             java.util.TimeZone timeZone)
                                      throws java.sql.SQLException
        Get time from raw text format.
        Specified by:
        getInternalTime in class RowProtocol
        Parameters:
        columnInfo - column information
        cal - calendar
        timeZone - time zone
        Returns:
        time value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalTimestamp

        public java.sql.Timestamp getInternalTimestamp​(ColumnDefinition columnInfo,
                                                       java.util.Calendar userCalendar,
                                                       java.util.TimeZone timeZone)
                                                throws java.sql.SQLException
        Get timestamp from raw text format.
        Specified by:
        getInternalTimestamp in class RowProtocol
        Parameters:
        columnInfo - column information
        userCalendar - calendar
        timeZone - time zone
        Returns:
        timestamp value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalObject

        public java.lang.Object getInternalObject​(ColumnDefinition columnInfo,
                                                  java.util.TimeZone timeZone)
                                           throws java.sql.SQLException
        Get Object from raw text format.
        Specified by:
        getInternalObject in class RowProtocol
        Parameters:
        columnInfo - column information
        timeZone - time zone
        Returns:
        Object value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalBoolean

        public boolean getInternalBoolean​(ColumnDefinition columnInfo)
        Get boolean from raw text format.
        Specified by:
        getInternalBoolean in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        boolean value
      • getInternalByte

        public byte getInternalByte​(ColumnDefinition columnInfo)
                             throws java.sql.SQLException
        Get byte from raw text format.
        Specified by:
        getInternalByte in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        byte value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalShort

        public short getInternalShort​(ColumnDefinition columnInfo)
                               throws java.sql.SQLException
        Get short from raw text format.
        Specified by:
        getInternalShort in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        short value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion or value is not in Short range
      • getInternalTimeString

        public java.lang.String getInternalTimeString​(ColumnDefinition columnInfo)
        Get Time in string format from raw text format.
        Specified by:
        getInternalTimeString in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        String representation of time
      • getInternalBigInteger

        public java.math.BigInteger getInternalBigInteger​(ColumnDefinition columnInfo)
        Get BigInteger format from raw text format.
        Specified by:
        getInternalBigInteger in class RowProtocol
        Parameters:
        columnInfo - column information
        Returns:
        BigInteger value
      • getInternalZonedDateTime

        public java.time.ZonedDateTime getInternalZonedDateTime​(ColumnDefinition columnInfo,
                                                                java.lang.Class clazz,
                                                                java.util.TimeZone timeZone)
                                                         throws java.sql.SQLException
        Get ZonedDateTime format from raw text format.
        Specified by:
        getInternalZonedDateTime in class RowProtocol
        Parameters:
        columnInfo - column information
        clazz - class for logging
        timeZone - time zone
        Returns:
        ZonedDateTime value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalOffsetTime

        public java.time.OffsetTime getInternalOffsetTime​(ColumnDefinition columnInfo,
                                                          java.util.TimeZone timeZone)
                                                   throws java.sql.SQLException
        Get OffsetTime format from raw text format.
        Specified by:
        getInternalOffsetTime in class RowProtocol
        Parameters:
        columnInfo - column information
        timeZone - time zone
        Returns:
        OffsetTime value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalLocalTime

        public java.time.LocalTime getInternalLocalTime​(ColumnDefinition columnInfo,
                                                        java.util.TimeZone timeZone)
                                                 throws java.sql.SQLException
        Get LocalTime format from raw text format.
        Specified by:
        getInternalLocalTime in class RowProtocol
        Parameters:
        columnInfo - column information
        timeZone - time zone
        Returns:
        LocalTime value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • getInternalLocalDate

        public java.time.LocalDate getInternalLocalDate​(ColumnDefinition columnInfo,
                                                        java.util.TimeZone timeZone)
                                                 throws java.sql.SQLException
        Get LocalDate format from raw text format.
        Specified by:
        getInternalLocalDate in class RowProtocol
        Parameters:
        columnInfo - column information
        timeZone - time zone
        Returns:
        LocalDate value
        Throws:
        java.sql.SQLException - if column type doesn't permit conversion
      • isBinaryEncoded

        public boolean isBinaryEncoded()
        Indicate if data is binary encoded.
        Specified by:
        isBinaryEncoded in class RowProtocol
        Returns:
        always false.