Class FBCallableStatement

    • Field Detail

      • selectableProcedure

        protected boolean selectableProcedure
    • Method Detail

      • getParameterMetaData

        public java.sql.ParameterMetaData getParameterMetaData()
                                                        throws java.sql.SQLException
        Specified by:
        getParameterMetaData in interface java.sql.PreparedStatement
        Overrides:
        getParameterMetaData in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • addBatch

        public void addBatch()
                      throws java.sql.SQLException
        Specified by:
        addBatch in interface java.sql.PreparedStatement
        Overrides:
        addBatch in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • clearBatch

        public void clearBatch()
                        throws java.sql.SQLException
        Specified by:
        clearBatch in interface java.sql.Statement
        Overrides:
        clearBatch in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • executeBatchInternal

        protected java.util.List<java.lang.Long> executeBatchInternal()
                                                               throws java.sql.SQLException
        Overrides:
        executeBatchInternal in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setSelectableProcedure

        public void setSelectableProcedure​(boolean selectableProcedure)
        Description copied from interface: FirebirdCallableStatement
        Mark this callable statement as a call of the selectable procedure. By default, callable statement uses "EXECUTE PROCEDURE" SQL statement to invoke stored procedures that return single row of output parameters or a result set. In former case it retrieves only the first row of the result set.
        Specified by:
        setSelectableProcedure in interface FirebirdCallableStatement
        Parameters:
        selectableProcedure - true if the called procedure is selectable.
        See Also:
        FirebirdCallableStatement.isSelectableProcedure()
      • setRequiredTypes

        protected void setRequiredTypes()
                                 throws java.sql.SQLException
        Set required types for output parameters.
        Throws:
        java.sql.SQLException - if something went wrong.
      • prepareFixedStatement

        protected void prepareFixedStatement​(java.lang.String sql)
                                      throws java.sql.SQLException
        We allow multiple calls to this method without re-preparing the statement. This is a workaround to the issue that the statement is actually prepared only after all OUT parameters are registered.
        Overrides:
        prepareFixedStatement in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • getMetaData

        public java.sql.ResultSetMetaData getMetaData()
                                               throws java.sql.SQLException

        Since we deferred the statement preparation until all OUT params are registered, we ensure that the statement is prepared before the meta data for the callable statement is obtained.

        Specified by:
        getMetaData in interface java.sql.PreparedStatement
        Overrides:
        getMetaData in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • execute

        public boolean execute()
                        throws java.sql.SQLException
        Specified by:
        execute in interface java.sql.PreparedStatement
        Overrides:
        execute in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • executeQuery

        public java.sql.ResultSet executeQuery()
                                        throws java.sql.SQLException
        Specified by:
        executeQuery in interface java.sql.PreparedStatement
        Overrides:
        executeQuery in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • executeUpdate

        public int executeUpdate()
                          throws java.sql.SQLException
        Specified by:
        executeUpdate in interface java.sql.PreparedStatement
        Overrides:
        executeUpdate in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • internalExecute

        protected boolean internalExecute​(boolean sendOutParams)
                                   throws java.sql.SQLException
        Description copied from class: FBPreparedStatement
        Execute this statement. Method checks whether all parameters are set, flushes all "flushable" fields that might contain cached data and executes the statement.
        Overrides:
        internalExecute in class FBPreparedStatement
        Parameters:
        sendOutParams - Determines if the XSQLDA structure should be sent to the database
        Returns:
        true if the statement has more result sets.
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         int sqlType)
                                  throws java.sql.SQLException
        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         int sqlType,
                                         int scale)
                                  throws java.sql.SQLException

        Implementation note: This method will behave the same as calling registerOutParameter(int, int).

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         java.sql.SQLType sqlType)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(int, int) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         java.sql.SQLType sqlType,
                                         int scale)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(int, int, int) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         java.sql.SQLType sqlType,
                                         java.lang.String typeName)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(int, int, String) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • wasNull

        public boolean wasNull()
                        throws java.sql.SQLException
        Specified by:
        wasNull in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getString

        public java.lang.String getString​(int parameterIndex)
                                   throws java.sql.SQLException
        Specified by:
        getString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBoolean

        public boolean getBoolean​(int parameterIndex)
                           throws java.sql.SQLException
        Specified by:
        getBoolean in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getByte

        public byte getByte​(int parameterIndex)
                     throws java.sql.SQLException
        Specified by:
        getByte in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getShort

        public short getShort​(int parameterIndex)
                       throws java.sql.SQLException
        Specified by:
        getShort in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getInt

        public int getInt​(int parameterIndex)
                   throws java.sql.SQLException
        Specified by:
        getInt in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getLong

        public long getLong​(int parameterIndex)
                     throws java.sql.SQLException
        Specified by:
        getLong in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getFloat

        public float getFloat​(int parameterIndex)
                       throws java.sql.SQLException
        Specified by:
        getFloat in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDouble

        public double getDouble​(int parameterIndex)
                         throws java.sql.SQLException
        Specified by:
        getDouble in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBigDecimal

        @Deprecated
        public java.math.BigDecimal getBigDecimal​(int parameterIndex,
                                                  int scale)
                                           throws java.sql.SQLException
        Deprecated.
        Specified by:
        getBigDecimal in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBytes

        public byte[] getBytes​(int parameterIndex)
                        throws java.sql.SQLException
        Specified by:
        getBytes in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDate

        public java.sql.Date getDate​(int parameterIndex)
                              throws java.sql.SQLException
        Specified by:
        getDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTime

        public java.sql.Time getTime​(int parameterIndex)
                              throws java.sql.SQLException
        Specified by:
        getTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTimestamp

        public java.sql.Timestamp getTimestamp​(int parameterIndex)
                                        throws java.sql.SQLException
        Specified by:
        getTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public java.lang.Object getObject​(int parameterIndex)
                                   throws java.sql.SQLException

        Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.

        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public java.lang.Object getObject​(java.lang.String colName)
                                   throws java.sql.SQLException

        Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.

        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public java.lang.Object getObject​(int parameterIndex,
                                          java.util.Map<java.lang.String,​java.lang.Class<?>> map)
                                   throws java.sql.SQLException

        Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.

        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public java.lang.Object getObject​(java.lang.String colName,
                                          java.util.Map<java.lang.String,​java.lang.Class<?>> map)
                                   throws java.sql.SQLException

        Implementation note: the registered type is ignored, and the type derived from the actual datatype will be used.

        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public <T> T getObject​(int parameterIndex,
                               java.lang.Class<T> type)
                        throws java.sql.SQLException
        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getObject

        public <T> T getObject​(java.lang.String parameterName,
                               java.lang.Class<T> type)
                        throws java.sql.SQLException
        Specified by:
        getObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBigDecimal

        public java.math.BigDecimal getBigDecimal​(int parameterIndex)
                                           throws java.sql.SQLException
        Specified by:
        getBigDecimal in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getRef

        public java.sql.Ref getRef​(int parameterIndex)
                            throws java.sql.SQLException
        Specified by:
        getRef in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBlob

        public java.sql.Blob getBlob​(int parameterIndex)
                              throws java.sql.SQLException
        Specified by:
        getBlob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getClob

        public java.sql.Clob getClob​(int parameterIndex)
                              throws java.sql.SQLException
        Specified by:
        getClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getArray

        public java.sql.Array getArray​(int parameterIndex)
                                throws java.sql.SQLException
        Specified by:
        getArray in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDate

        public java.sql.Date getDate​(int parameterIndex,
                                     java.util.Calendar cal)
                              throws java.sql.SQLException
        Specified by:
        getDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTime

        public java.sql.Time getTime​(int parameterIndex,
                                     java.util.Calendar cal)
                              throws java.sql.SQLException
        Specified by:
        getTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTimestamp

        public java.sql.Timestamp getTimestamp​(int parameterIndex,
                                               java.util.Calendar cal)
                                        throws java.sql.SQLException
        Specified by:
        getTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getURL

        public java.net.URL getURL​(int parameterIndex)
                            throws java.sql.SQLException
        Specified by:
        getURL in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getString

        public java.lang.String getString​(java.lang.String colName)
                                   throws java.sql.SQLException
        Specified by:
        getString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBoolean

        public boolean getBoolean​(java.lang.String colName)
                           throws java.sql.SQLException
        Specified by:
        getBoolean in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getByte

        public byte getByte​(java.lang.String colName)
                     throws java.sql.SQLException
        Specified by:
        getByte in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getShort

        public short getShort​(java.lang.String colName)
                       throws java.sql.SQLException
        Specified by:
        getShort in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getInt

        public int getInt​(java.lang.String colName)
                   throws java.sql.SQLException
        Specified by:
        getInt in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getLong

        public long getLong​(java.lang.String colName)
                     throws java.sql.SQLException
        Specified by:
        getLong in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getFloat

        public float getFloat​(java.lang.String colName)
                       throws java.sql.SQLException
        Specified by:
        getFloat in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDouble

        public double getDouble​(java.lang.String colName)
                         throws java.sql.SQLException
        Specified by:
        getDouble in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBytes

        public byte[] getBytes​(java.lang.String colName)
                        throws java.sql.SQLException
        Specified by:
        getBytes in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDate

        public java.sql.Date getDate​(java.lang.String colName)
                              throws java.sql.SQLException
        Specified by:
        getDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTime

        public java.sql.Time getTime​(java.lang.String colName)
                              throws java.sql.SQLException
        Specified by:
        getTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTimestamp

        public java.sql.Timestamp getTimestamp​(java.lang.String colName)
                                        throws java.sql.SQLException
        Specified by:
        getTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBigDecimal

        public java.math.BigDecimal getBigDecimal​(java.lang.String colName)
                                           throws java.sql.SQLException
        Specified by:
        getBigDecimal in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getRef

        public java.sql.Ref getRef​(java.lang.String colName)
                            throws java.sql.SQLException
        Specified by:
        getRef in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getBlob

        public java.sql.Blob getBlob​(java.lang.String colName)
                              throws java.sql.SQLException
        Specified by:
        getBlob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getClob

        public java.sql.Clob getClob​(java.lang.String colName)
                              throws java.sql.SQLException
        Specified by:
        getClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getArray

        public java.sql.Array getArray​(java.lang.String colName)
                                throws java.sql.SQLException
        Specified by:
        getArray in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getDate

        public java.sql.Date getDate​(java.lang.String colName,
                                     java.util.Calendar cal)
                              throws java.sql.SQLException
        Specified by:
        getDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTime

        public java.sql.Time getTime​(java.lang.String colName,
                                     java.util.Calendar cal)
                              throws java.sql.SQLException
        Specified by:
        getTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getTimestamp

        public java.sql.Timestamp getTimestamp​(java.lang.String colName,
                                               java.util.Calendar cal)
                                        throws java.sql.SQLException
        Specified by:
        getTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getURL

        public java.net.URL getURL​(java.lang.String colName)
                            throws java.sql.SQLException
        Specified by:
        getURL in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getCharacterStream

        public java.io.Reader getCharacterStream​(int parameterIndex)
                                          throws java.sql.SQLException
        Specified by:
        getCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getCharacterStream

        public java.io.Reader getCharacterStream​(java.lang.String parameterName)
                                          throws java.sql.SQLException
        Specified by:
        getCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getNCharacterStream

        public java.io.Reader getNCharacterStream​(int parameterIndex)
                                           throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getCharacterStream(int).

        Specified by:
        getNCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getNCharacterStream

        public java.io.Reader getNCharacterStream​(java.lang.String parameterName)
                                           throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getCharacterStream(String) .

        Specified by:
        getNCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getNString

        public java.lang.String getNString​(int parameterIndex)
                                    throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getString(int).

        Specified by:
        getNString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getNString

        public java.lang.String getNString​(java.lang.String parameterName)
                                    throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getString(String).

        Specified by:
        getNString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setAsciiStream

        public void setAsciiStream​(java.lang.String parameterName,
                                   java.io.InputStream x,
                                   long length)
                            throws java.sql.SQLException
        Specified by:
        setAsciiStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setAsciiStream

        public void setAsciiStream​(java.lang.String parameterName,
                                   java.io.InputStream x)
                            throws java.sql.SQLException
        Specified by:
        setAsciiStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(java.lang.String parameterName,
                                    java.io.InputStream x,
                                    long length)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(java.lang.String parameterName,
                                    java.io.InputStream x)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(java.lang.String parameterName,
                            java.sql.Blob x)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(java.lang.String parameterName,
                            java.io.InputStream inputStream,
                            long length)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(java.lang.String parameterName,
                            java.io.InputStream inputStream)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(java.lang.String parameterName,
                                       java.io.Reader reader,
                                       long length)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(java.lang.String parameterName,
                                       java.io.Reader reader)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(java.lang.String parameterName,
                            java.sql.Clob x)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(java.lang.String parameterName,
                            java.io.Reader reader,
                            long length)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(java.lang.String parameterName,
                            java.io.Reader reader)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNCharacterStream

        public void setNCharacterStream​(java.lang.String parameterName,
                                        java.io.Reader value,
                                        long length)
                                 throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setCharacterStream(String, Reader, long).

        Specified by:
        setNCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNCharacterStream

        public void setNCharacterStream​(java.lang.String parameterName,
                                        java.io.Reader value)
                                 throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setCharacterStream(String, Reader).

        Specified by:
        setNCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public void setNClob​(java.lang.String parameterName,
                             java.io.Reader reader,
                             long length)
                      throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setClob(String, Reader, long).

        Specified by:
        setNClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public void setNClob​(java.lang.String parameterName,
                             java.io.Reader reader)
                      throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setClob(String, Reader).

        Specified by:
        setNClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNString

        public void setNString​(java.lang.String parameterName,
                               java.lang.String value)
                        throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setString(String, String).

        Specified by:
        setNString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String param1,
                                         int param2)
                                  throws java.sql.SQLException
        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String param1,
                                         int param2,
                                         int param3)
                                  throws java.sql.SQLException
        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String param1,
                                         int param2,
                                         java.lang.String param3)
                                  throws java.sql.SQLException
        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String parameterName,
                                         java.sql.SQLType sqlType)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(String, int) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String parameterName,
                                         java.sql.SQLType sqlType,
                                         int scale)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(String, int, int) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(java.lang.String parameterName,
                                         java.sql.SQLType sqlType,
                                         java.lang.String typeName)
                                  throws java.sql.SQLException

        Implementation note: behaves as registerOutParameter(String, int, String) called with SQLType.getVendorTypeNumber().

        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setURL

        public void setURL​(java.lang.String param1,
                           java.net.URL param2)
                    throws java.sql.SQLException
        Specified by:
        setURL in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNull

        public void setNull​(java.lang.String param1,
                            int param2)
                     throws java.sql.SQLException
        Specified by:
        setNull in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBoolean

        public void setBoolean​(java.lang.String param1,
                               boolean param2)
                        throws java.sql.SQLException
        Specified by:
        setBoolean in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setByte

        public void setByte​(java.lang.String param1,
                            byte param2)
                     throws java.sql.SQLException
        Specified by:
        setByte in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setShort

        public void setShort​(java.lang.String param1,
                             short param2)
                      throws java.sql.SQLException
        Specified by:
        setShort in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setInt

        public void setInt​(java.lang.String param1,
                           int param2)
                    throws java.sql.SQLException
        Specified by:
        setInt in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setLong

        public void setLong​(java.lang.String param1,
                            long param2)
                     throws java.sql.SQLException
        Specified by:
        setLong in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setFloat

        public void setFloat​(java.lang.String param1,
                             float param2)
                      throws java.sql.SQLException
        Specified by:
        setFloat in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setDouble

        public void setDouble​(java.lang.String param1,
                              double param2)
                       throws java.sql.SQLException
        Specified by:
        setDouble in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBigDecimal

        public void setBigDecimal​(java.lang.String param1,
                                  java.math.BigDecimal param2)
                           throws java.sql.SQLException
        Specified by:
        setBigDecimal in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setString

        public void setString​(java.lang.String param1,
                              java.lang.String param2)
                       throws java.sql.SQLException
        Specified by:
        setString in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBytes

        public void setBytes​(java.lang.String param1,
                             byte[] param2)
                      throws java.sql.SQLException
        Specified by:
        setBytes in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setDate

        public void setDate​(java.lang.String param1,
                            java.sql.Date param2)
                     throws java.sql.SQLException
        Specified by:
        setDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setTime

        public void setTime​(java.lang.String param1,
                            java.sql.Time param2)
                     throws java.sql.SQLException
        Specified by:
        setTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setTimestamp

        public void setTimestamp​(java.lang.String param1,
                                 java.sql.Timestamp param2)
                          throws java.sql.SQLException
        Specified by:
        setTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setAsciiStream

        public void setAsciiStream​(java.lang.String param1,
                                   java.io.InputStream param2,
                                   int param3)
                            throws java.sql.SQLException
        Specified by:
        setAsciiStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(java.lang.String param1,
                                    java.io.InputStream param2,
                                    int param3)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setObject

        public void setObject​(java.lang.String param1,
                              java.lang.Object param2,
                              int param3,
                              int param4)
                       throws java.sql.SQLException
        Specified by:
        setObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setObject

        public void setObject​(java.lang.String param1,
                              java.lang.Object param2,
                              int param3)
                       throws java.sql.SQLException
        Specified by:
        setObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setObject

        public void setObject​(java.lang.String param1,
                              java.lang.Object param2)
                       throws java.sql.SQLException
        Specified by:
        setObject in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(java.lang.String param1,
                                       java.io.Reader param2,
                                       int param3)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setDate

        public void setDate​(java.lang.String param1,
                            java.sql.Date param2,
                            java.util.Calendar param3)
                     throws java.sql.SQLException
        Specified by:
        setDate in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setTime

        public void setTime​(java.lang.String param1,
                            java.sql.Time param2,
                            java.util.Calendar param3)
                     throws java.sql.SQLException
        Specified by:
        setTime in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setTimestamp

        public void setTimestamp​(java.lang.String param1,
                                 java.sql.Timestamp param2,
                                 java.util.Calendar param3)
                          throws java.sql.SQLException
        Specified by:
        setTimestamp in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNull

        public void setNull​(java.lang.String param1,
                            int param2,
                            java.lang.String param3)
                     throws java.sql.SQLException
        Specified by:
        setNull in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • registerOutParameter

        public void registerOutParameter​(int parameterIndex,
                                         int sqlType,
                                         java.lang.String typeName)
                                  throws java.sql.SQLException
        Specified by:
        registerOutParameter in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getGeneratedKeys

        public java.sql.ResultSet getGeneratedKeys()
                                            throws java.sql.SQLException
        Specified by:
        getGeneratedKeys in interface java.sql.Statement
        Overrides:
        getGeneratedKeys in class FBStatement
        Throws:
        java.sql.SQLException
      • assertHasData

        protected void assertHasData​(java.sql.ResultSet rs)
                              throws java.sql.SQLException
        Asserts if the current statement has data to return. It checks if the result set has a row with data.
        Parameters:
        rs - result set to test
        Throws:
        java.sql.SQLException - when the result set has no data.
      • getCurrentResultSet

        public java.sql.ResultSet getCurrentResultSet()
                                               throws java.sql.SQLException
        Description copied from interface: FirebirdStatement
        Get current result set. Behaviour of this method is similar to the behavior of the Statement.getResultSet(), except that this method can be called as much as you like.
        Specified by:
        getCurrentResultSet in interface FirebirdStatement
        Overrides:
        getCurrentResultSet in class FBStatement
        Returns:
        instance of ResultSet representing current result set or null if it is not available.
        Throws:
        java.sql.SQLException - if database access error happened.
      • getAndAssertSingletonResultSet

        protected java.sql.ResultSet getAndAssertSingletonResultSet()
                                                             throws java.sql.SQLException
        Returns the result set for the singleton row of the callable statement and asserts it has data. If this is a selectable procedure, or there is no singleton row, it will return the normal result set.

        This should fix the problem described in JDBC-350 in most circumstances.

        Returns:
        Either the singleton result set, or the current result set as described above
        Throws:
        java.sql.SQLException - For database access errors
      • getResultSet

        public java.sql.ResultSet getResultSet()
                                        throws java.sql.SQLException

        Calling this method twice with autocommit on and used will probably throw an inappropriate or uninformative exception.

        Specified by:
        getResultSet in interface java.sql.Statement
        Overrides:
        getResultSet in class FBStatement
        Throws:
        java.sql.SQLException
      • setBigDecimal

        public void setBigDecimal​(int parameterIndex,
                                  java.math.BigDecimal x)
                           throws java.sql.SQLException
        Specified by:
        setBigDecimal in interface java.sql.PreparedStatement
        Overrides:
        setBigDecimal in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(int parameterIndex,
                                    java.io.InputStream inputStream,
                                    int length)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Overrides:
        setBinaryStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(int parameterIndex,
                                    java.io.InputStream inputStream,
                                    long length)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Overrides:
        setBinaryStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public void setBinaryStream​(int parameterIndex,
                                    java.io.InputStream inputStream)
                             throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Overrides:
        setBinaryStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(int parameterIndex,
                            java.sql.Blob blob)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Overrides:
        setBlob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(int parameterIndex,
                            java.io.InputStream inputStream,
                            long length)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Overrides:
        setBlob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public void setBlob​(int parameterIndex,
                            java.io.InputStream inputStream)
                     throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Overrides:
        setBlob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBoolean

        public void setBoolean​(int parameterIndex,
                               boolean x)
                        throws java.sql.SQLException
        Specified by:
        setBoolean in interface java.sql.PreparedStatement
        Overrides:
        setBoolean in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setByte

        public void setByte​(int parameterIndex,
                            byte x)
                     throws java.sql.SQLException
        Specified by:
        setByte in interface java.sql.PreparedStatement
        Overrides:
        setByte in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setBytes

        public void setBytes​(int parameterIndex,
                             byte[] x)
                      throws java.sql.SQLException
        Specified by:
        setBytes in interface java.sql.PreparedStatement
        Overrides:
        setBytes in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(int parameterIndex,
                                       java.io.Reader reader,
                                       int length)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Overrides:
        setCharacterStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(int parameterIndex,
                                       java.io.Reader reader,
                                       long length)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Overrides:
        setCharacterStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public void setCharacterStream​(int parameterIndex,
                                       java.io.Reader reader)
                                throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Overrides:
        setCharacterStream in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(int parameterIndex,
                            java.sql.Clob x)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Overrides:
        setClob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(int parameterIndex,
                            java.io.Reader reader,
                            long length)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Overrides:
        setClob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public void setClob​(int parameterIndex,
                            java.io.Reader reader)
                     throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Overrides:
        setClob in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setDate

        public void setDate​(int parameterIndex,
                            java.sql.Date x,
                            java.util.Calendar cal)
                     throws java.sql.SQLException
        Specified by:
        setDate in interface java.sql.PreparedStatement
        Overrides:
        setDate in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setDate

        public void setDate​(int parameterIndex,
                            java.sql.Date x)
                     throws java.sql.SQLException
        Specified by:
        setDate in interface java.sql.PreparedStatement
        Overrides:
        setDate in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setDouble

        public void setDouble​(int parameterIndex,
                              double x)
                       throws java.sql.SQLException
        Specified by:
        setDouble in interface java.sql.PreparedStatement
        Overrides:
        setDouble in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setFloat

        public void setFloat​(int parameterIndex,
                             float x)
                      throws java.sql.SQLException
        Specified by:
        setFloat in interface java.sql.PreparedStatement
        Overrides:
        setFloat in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setInt

        public void setInt​(int parameterIndex,
                           int x)
                    throws java.sql.SQLException
        Specified by:
        setInt in interface java.sql.PreparedStatement
        Overrides:
        setInt in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setLong

        public void setLong​(int parameterIndex,
                            long x)
                     throws java.sql.SQLException
        Specified by:
        setLong in interface java.sql.PreparedStatement
        Overrides:
        setLong in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setNull

        public void setNull​(int parameterIndex,
                            int sqlType,
                            java.lang.String typeName)
                     throws java.sql.SQLException
        Specified by:
        setNull in interface java.sql.PreparedStatement
        Overrides:
        setNull in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setNull

        public void setNull​(int parameterIndex,
                            int sqlType)
                     throws java.sql.SQLException
        Specified by:
        setNull in interface java.sql.PreparedStatement
        Overrides:
        setNull in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setObject

        public void setObject​(int parameterIndex,
                              java.lang.Object x,
                              int targetSqlType,
                              int scale)
                       throws java.sql.SQLException
        Description copied from class: FBPreparedStatement

        Implementation note: ignores scale and targetSqlType and works as FBPreparedStatement.setObject(int, Object).

        Specified by:
        setObject in interface java.sql.PreparedStatement
        Overrides:
        setObject in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setObject

        public void setObject​(int parameterIndex,
                              java.lang.Object x)
                       throws java.sql.SQLException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Overrides:
        setObject in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setShort

        public void setShort​(int parameterIndex,
                             short x)
                      throws java.sql.SQLException
        Specified by:
        setShort in interface java.sql.PreparedStatement
        Overrides:
        setShort in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setString

        public void setString​(int parameterIndex,
                              java.lang.String x)
                       throws java.sql.SQLException
        Specified by:
        setString in interface java.sql.PreparedStatement
        Overrides:
        setString in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setTime

        public void setTime​(int parameterIndex,
                            java.sql.Time x,
                            java.util.Calendar cal)
                     throws java.sql.SQLException
        Specified by:
        setTime in interface java.sql.PreparedStatement
        Overrides:
        setTime in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setTime

        public void setTime​(int parameterIndex,
                            java.sql.Time x)
                     throws java.sql.SQLException
        Specified by:
        setTime in interface java.sql.PreparedStatement
        Overrides:
        setTime in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setTimestamp

        public void setTimestamp​(int parameterIndex,
                                 java.sql.Timestamp x,
                                 java.util.Calendar cal)
                          throws java.sql.SQLException
        Specified by:
        setTimestamp in interface java.sql.PreparedStatement
        Overrides:
        setTimestamp in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • setTimestamp

        public void setTimestamp​(int parameterIndex,
                                 java.sql.Timestamp x)
                          throws java.sql.SQLException
        Specified by:
        setTimestamp in interface java.sql.PreparedStatement
        Overrides:
        setTimestamp in class FBPreparedStatement
        Throws:
        java.sql.SQLException
      • findOutParameter

        @Deprecated
        protected int findOutParameter​(java.lang.String paramName)
                                throws java.sql.SQLException
        Deprecated.
        use getAndAssertSingletonResultSet().findColumn(paramName) (but verify if that is the right thing to do); method will be removed in Jaybird 6
        Helper method to identify the right result set column for an OUT parameter name.
        Parameters:
        paramName - name of the OUT parameter
        Throws:
        java.sql.SQLException
      • getNClob

        public java.sql.NClob getNClob​(int parameterIndex)
                                throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getClob(int).

        Specified by:
        getNClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getNClob

        public java.sql.NClob getNClob​(java.lang.String parameterName)
                                throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as getClob(String).

        Specified by:
        getNClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getRowId

        public java.sql.RowId getRowId​(int parameterIndex)
                                throws java.sql.SQLException
        Specified by:
        getRowId in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getRowId

        public java.sql.RowId getRowId​(java.lang.String parameterName)
                                throws java.sql.SQLException
        Specified by:
        getRowId in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getSQLXML

        public java.sql.SQLXML getSQLXML​(int parameterIndex)
                                  throws java.sql.SQLException
        Specified by:
        getSQLXML in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • getSQLXML

        public java.sql.SQLXML getSQLXML​(java.lang.String parameterName)
                                  throws java.sql.SQLException
        Specified by:
        getSQLXML in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public void setNClob​(java.lang.String parameterName,
                             java.sql.NClob value)
                      throws java.sql.SQLException

        Implementation note: This method behaves exactly the same as setClob(String, Clob).

        Specified by:
        setNClob in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setRowId

        public void setRowId​(java.lang.String parameterName,
                             java.sql.RowId x)
                      throws java.sql.SQLException
        Specified by:
        setRowId in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException
      • setSQLXML

        public void setSQLXML​(java.lang.String parameterName,
                              java.sql.SQLXML xmlObject)
                       throws java.sql.SQLException
        Specified by:
        setSQLXML in interface java.sql.CallableStatement
        Throws:
        java.sql.SQLException