类 SqlParameter

    • 构造器详细资料

      • SqlParameter

        public SqlParameter​(int sqlType)
        Create a new anonymous SqlParameter, supplying the SQL type.
        参数:
        sqlType - SQL type of the parameter according to java.sql.Types
      • SqlParameter

        public SqlParameter​(int sqlType,
                            String typeName)
        Create a new anonymous SqlParameter, supplying the SQL type.
        参数:
        sqlType - SQL type of the parameter according to java.sql.Types
        typeName - the type name of the parameter (optional)
      • SqlParameter

        public SqlParameter​(int sqlType,
                            int scale)
        Create a new anonymous SqlParameter, supplying the SQL type.
        参数:
        sqlType - SQL type of the parameter according to java.sql.Types
        scale - the number of digits after the decimal point (for DECIMAL and NUMERIC types)
      • SqlParameter

        public SqlParameter​(String name,
                            int sqlType)
        Create a new SqlParameter, supplying name and SQL type.
        参数:
        name - name of the parameter, as used in input and output maps
        sqlType - SQL type of the parameter according to java.sql.Types
      • SqlParameter

        public SqlParameter​(String name,
                            int sqlType,
                            String typeName)
        Create a new SqlParameter, supplying name and SQL type.
        参数:
        name - name of the parameter, as used in input and output maps
        sqlType - SQL type of the parameter according to java.sql.Types
        typeName - the type name of the parameter (optional)
      • SqlParameter

        public SqlParameter​(String name,
                            int sqlType,
                            int scale)
        Create a new SqlParameter, supplying name and SQL type.
        参数:
        name - name of the parameter, as used in input and output maps
        sqlType - SQL type of the parameter according to java.sql.Types
        scale - the number of digits after the decimal point (for DECIMAL and NUMERIC types)
      • SqlParameter

        public SqlParameter​(SqlParameter otherParam)
        Copy constructor.
        参数:
        otherParam - the SqlParameter object to copy from
    • 方法详细资料

      • getName

        public String getName()
        Return the name of the parameter, or null if anonymous.
      • getSqlType

        public int getSqlType()
        Return the SQL type of the parameter.
      • getTypeName

        public String getTypeName()
        Return the type name of the parameter, if any.
      • getScale

        public Integer getScale()
        Return the scale of the parameter, if any.
      • isInputValueProvided

        public boolean isInputValueProvided()
        Return whether this parameter holds input values that should be set before execution even if they are null.

        This implementation always returns true.

      • isResultsParameter

        public boolean isResultsParameter()
        Return whether this parameter is an implicit return parameter used during the results processing of CallableStatement.getMoreResults/getUpdateCount.

        This implementation always returns false.