Class DefaultCallableSql

    • Method Detail

      • setTimeout

        public CallableSql setTimeout​(int secs)
        Description copied from interface: CallableSql
        Set the statement execution timeout. Zero implies unlimited time.

        This is set to the underlying CallableStatement.

        Specified by:
        setTimeout in interface CallableSql
      • bind

        public CallableSql bind​(int position,
                                Object value)
        Description copied from interface: CallableSql
        Bind a parameter that is bound as a IN parameter.

        position starts at value 1 (not 0) to be consistent with CallableStatement.

        This is designed so that you do not need to set params in index order. You can set/register param 2 before param 1 etc.

        Specified by:
        bind in interface CallableSql
        Parameters:
        position - the index position of the parameter.
        value - the value of the parameter.
      • setParameter

        public CallableSql setParameter​(int position,
                                        Object value)
        Description copied from interface: CallableSql
        Bind a positioned parameter (same as bind method).
        Specified by:
        setParameter in interface CallableSql
        Parameters:
        position - the index position of the parameter.
        value - the value of the parameter.
      • registerOut

        public CallableSql registerOut​(int position,
                                       int type)
        Description copied from interface: CallableSql
        Register an OUT parameter.

        Note that position starts at value 1 (not 0) to be consistent with CallableStatement.

        This is designed so that you do not need to register params in index order. You can set/register param 2 before param 1 etc.

        Specified by:
        registerOut in interface CallableSql
        Parameters:
        position - the index position of the parameter (starts with 1).
        type - the jdbc type of the OUT parameter that will be read.
      • getObject

        public Object getObject​(int position)
        Description copied from interface: CallableSql
        Return an OUT parameter value.

        position starts at value 1 (not 0) to be consistent with CallableStatement.

        This can only be called after the CallableSql has been executed. When run in batch mode you effectively can't use this method.

        Specified by:
        getObject in interface CallableSql
      • addModification

        public CallableSql addModification​(String tableName,
                                           boolean inserts,
                                           boolean updates,
                                           boolean deletes)
        Description copied from interface: CallableSql
        Add table modification information to the TransactionEvent.

        This would be similar to using the DB.externalModification() method. It may be easier and make more sense to set it here with the CallableSql.

        For UpdateSql the table modification information is derived by parsing the sql to determine the table name and whether it was an insert, update or delete.

        Specified by:
        addModification in interface CallableSql