Parameters may be anonymous, in which case "name" is null.
However, all parameters must define a SQL type according to java..
java.sql.Types
| Modifier and Type | Field and Description |
|---|---|
| private String | name
The name of the parameter, if any |
| private Integer | scale
The scale to apply in case of a NUMERIC or DECIMAL type, if any |
| private final int | sqlType
SQL type constant from |
| private String | typeName
Used for types that are user-named like: STRUCT, DISTINCT, JAVA_OBJECT, named array types |
| Access | Constructor and Description |
|---|---|
| public | SqlParameter(int
SQL type of the parameter according to sqlType)java.sql.TypesCreate a new anonymous SqlParameter, supplying the SQL type. |
| public | SqlParameter(int
SQL type of the parameter according to sqlType, String java.sql.Typesthe type name of the parameter (optional) typeName)Create a new anonymous SqlParameter, supplying the SQL type. |
| public | SqlParameter(int
SQL type of the parameter according to sqlType, int java.sql.Typesthe number of digits after the decimal point
(for DECIMAL and NUMERIC types) scale)Create a new anonymous SqlParameter, supplying the SQL type. |
| public | SqlParameter(String
name of the parameter, as used in input and output maps name, int SQL type of the parameter according to sqlType)java.sql.TypesCreate a new SqlParameter, supplying name and SQL type. |
| public | SqlParameter(String
name of the parameter, as used in input and output maps name, int SQL type of the parameter according to sqlType, String java.sql.Typesthe type name of the parameter (optional) typeName)Create a new SqlParameter, supplying name and SQL type. |
| public | SqlParameter(String
name of the parameter, as used in input and output maps name, int SQL type of the parameter according to sqlType, int java.sql.Typesthe number of digits after the decimal point
(for DECIMAL and NUMERIC types) scale)Create a new SqlParameter, supplying name and SQL type. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Integer | |
| public int | |
| public String | |
| public boolean | isInputValueProvided()
Return whether this parameter holds input values that should be set
before execution even if they are |
| public boolean | isResultsParameter()
Return whether this parameter is an implicit return parameter used during the results processing of the CallableStatement.getMoreResults/getUpdateCount. |
| name | back to summary |
|---|---|
| private String name The name of the parameter, if any | |
| scale | back to summary |
|---|---|
| private Integer scale The scale to apply in case of a NUMERIC or DECIMAL type, if any | |
| sqlType | back to summary |
|---|---|
| private final int sqlType SQL type constant from | |
| typeName | back to summary |
|---|---|
| private String typeName Used for types that are user-named like: STRUCT, DISTINCT, JAVA_OBJECT, named array types | |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(int sqlType) Create a new anonymous SqlParameter, supplying the SQL type.
| |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(int sqlType, String typeName) Create a new anonymous SqlParameter, supplying the SQL type.
| |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(int sqlType, int scale) Create a new anonymous SqlParameter, supplying the SQL type.
| |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(String name, int sqlType) Create a new SqlParameter, supplying name and SQL type.
| |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(String name, int sqlType, String typeName) Create a new SqlParameter, supplying name and SQL type. | |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(String name, int sqlType, int scale) Create a new SqlParameter, supplying name and SQL type.
| |
| SqlParameter | back to summary |
|---|---|
| public SqlParameter(SqlParameter otherParam) Copy constructor.
| |
| getName | back to summary |
|---|---|
| public String getName() Return the name of the parameter. | |
| getScale | back to summary |
|---|---|
| public Integer getScale() Return the scale of the parameter, if any. | |
| getSqlType | back to summary |
|---|---|
| public int getSqlType() Return the SQL type of the parameter. | |
| getTypeName | back to summary |
|---|---|
| public String getTypeName() Return the type name of the parameter, if any. | |
| isInputValueProvided | back to summary |
|---|---|
| public boolean isInputValueProvided() Return whether this parameter holds input values that should be set
before execution even if they are This implementation always returns | |
| isResultsParameter | back to summary |
|---|---|
| public boolean isResultsParameter() Return whether this parameter is an implicit return parameter used during the results processing of the CallableStatement.getMoreResults/getUpdateCount. This implementation always returns | |