类 CallMetaDataContext


  • public class CallMetaDataContext
    extends Object
    Class to manage context meta-data used for the configuration and execution of a stored procedure call.
    从以下版本开始:
    2.5
    作者:
    Thomas Risberg, Juergen Hoeller, Kiril Nugmanov
    • 字段详细资料

    • 方法详细资料

      • setFunctionReturnName

        public void setFunctionReturnName​(String functionReturnName)
        Specify the name used for the return value of the function.
      • setFunction

        public void setFunction​(boolean function)
        Specify whether this call is a function call.
      • isFunction

        public boolean isFunction()
        Check whether this call is a function call.
      • setReturnValueRequired

        public void setReturnValueRequired​(boolean returnValueRequired)
        Specify whether a return value is required.
      • setAccessCallParameterMetaData

        public void setAccessCallParameterMetaData​(boolean accessCallParameterMetaData)
        Specify whether call parameter meta-data should be accessed.
      • setNamedBinding

        public void setNamedBinding​(boolean namedBinding)
        Specify whether parameters should be bound by name.
        从以下版本开始:
        4.2
      • isNamedBinding

        public boolean isNamedBinding()
        Check whether parameters should be bound by name.
        从以下版本开始:
        4.2
      • initializeMetaData

        public void initializeMetaData​(DataSource dataSource)
        Initialize this class with meta-data from the database.
        参数:
        dataSource - the DataSource used to retrieve meta-data
      • createReturnResultSetParameter

        public SqlParameter createReturnResultSetParameter​(String parameterName,
                                                           RowMapper<?> rowMapper)
        Create a ReturnResultSetParameter/SqlOutParameter depending on the support provided by the JDBC driver used for the database in use.
        参数:
        parameterName - the name of the parameter (also used as the name of the List returned in the output)
        rowMapper - a RowMapper implementation used to map the data returned in the result set
        返回:
        the appropriate SqlParameter
      • getScalarOutParameterName

        public String getScalarOutParameterName()
        Get the name of the single out parameter for this call. If there are multiple parameters, the name of the first one will be returned.
      • processParameters

        public void processParameters​(List<SqlParameter> parameters)
        Process the list of parameters provided, and if procedure column meta-data is used, the parameters will be matched against the meta-data information and any missing ones will be automatically included.
        参数:
        parameters - the list of parameters to use as a base
      • matchInParameterValuesWithCallParameters

        public Map<String,​?> matchInParameterValuesWithCallParameters​(Map<String,​?> inParameters)
        Match input parameter values with the parameters declared to be used in the call.
        参数:
        inParameters - the input values
        返回:
        a Map containing the matched parameter names with the value taken from the input
      • createCallString

        public String createCallString()
        Build the call string based on configuration and meta-data information.
        返回:
        the call string to be used
      • createParameterBinding

        protected String createParameterBinding​(SqlParameter parameter)
        Build the parameter binding fragment.
        参数:
        parameter - call parameter
        返回:
        parameter binding fragment
        从以下版本开始:
        4.2