Top Description Fields Constructors Methods
liquibase.executor.jvm

pack-priv Class SqlParameter

extends Object
Class Inheritance
Known Direct Subclasses
liquibase.executor.jvm.SqlParameterValue

Object to represent a SQL parameter definition.

Parameters may be anonymous, in which case "name" is null. However, all parameters must define a SQL type according to java.sql.Types.

Author
Spring Framework
See Also
java.sql.Types

Field Summary

Modifier and TypeField 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 java.sql.Types

private String
typeName

Used for types that are user-named like: STRUCT, DISTINCT, JAVA_OBJECT, named array types

Constructor Summary

AccessConstructor and Description
public
SqlParameter(int
SQL type of the parameter according to java.sql.Types
sqlType
)

Create a new anonymous SqlParameter, supplying the SQL type.

public
SqlParameter(int
SQL type of the parameter according to java.sql.Types
sqlType
,
String
the 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 java.sql.Types
sqlType
,
int
the 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 java.sql.Types
sqlType
)

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 java.sql.Types
sqlType
,
String
the 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 java.sql.Types
sqlType
,
int
the number of digits after the decimal point (for DECIMAL and NUMERIC types)
scale
)

Create a new SqlParameter, supplying name and SQL type.

public
SqlParameter(SqlParameter
the SqlParameter object to copy from
otherParam
)

Copy constructor.

Method Summary

Modifier and TypeMethod and Description
public String
getName()

Return the name of the parameter.

public Integer
getScale()

Return the scale of the parameter, if any.

public int
getSqlType()

Return the SQL type of the parameter.

public String
getTypeName()

Return the type name of the parameter, if any.

public boolean
isInputValueProvided()

Return whether this parameter holds input values that should be set before execution even if they are null.

public boolean
isResultsParameter()

Return whether this parameter is an implicit return parameter used during the results processing of the CallableStatement.getMoreResults/getUpdateCount.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
private String name

The name of the parameter, if any

scaleback to summary
private Integer scale

The scale to apply in case of a NUMERIC or DECIMAL type, if any

sqlTypeback to summary
private final int sqlType

SQL type constant from java.sql.Types

typeNameback to summary
private String typeName

Used for types that are user-named like: STRUCT, DISTINCT, JAVA_OBJECT, named array types

Constructor Detail

SqlParameterback to summary
public SqlParameter(int sqlType)

Create a new anonymous SqlParameter, supplying the SQL type.

Parameters
sqlType:int

SQL type of the parameter according to java.sql.Types

SqlParameterback to summary
public SqlParameter(int sqlType, String typeName)

Create a new anonymous SqlParameter, supplying the SQL type.

Parameters
sqlType:int

SQL type of the parameter according to java.sql.Types

typeName:String

the type name of the parameter (optional)

SqlParameterback to summary
public SqlParameter(int sqlType, int scale)

Create a new anonymous SqlParameter, supplying the SQL type.

Parameters
sqlType:int

SQL type of the parameter according to java.sql.Types

scale:int

the number of digits after the decimal point (for DECIMAL and NUMERIC types)

SqlParameterback to summary
public SqlParameter(String name, int sqlType)

Create a new SqlParameter, supplying name and SQL type.

Parameters
name:String

name of the parameter, as used in input and output maps

sqlType:int

SQL type of the parameter according to java.sql.Types

SqlParameterback to summary
public SqlParameter(String name, int sqlType, String typeName)

Create a new SqlParameter, supplying name and SQL type.

Parameters
name:String

name of the parameter, as used in input and output maps

sqlType:int

SQL type of the parameter according to java.sql.Types

typeName:String

the type name of the parameter (optional)

SqlParameterback to summary
public SqlParameter(String name, int sqlType, int scale)

Create a new SqlParameter, supplying name and SQL type.

Parameters
name:String

name of the parameter, as used in input and output maps

sqlType:int

SQL type of the parameter according to java.sql.Types

scale:int

the number of digits after the decimal point (for DECIMAL and NUMERIC types)

SqlParameterback to summary
public SqlParameter(SqlParameter otherParam)

Copy constructor.

Parameters
otherParam:SqlParameter

the SqlParameter object to copy from

Method Detail

getNameback to summary
public String getName()

Return the name of the parameter.

getScaleback to summary
public Integer getScale()

Return the scale of the parameter, if any.

getSqlTypeback to summary
public int getSqlType()

Return the SQL type of the parameter.

getTypeNameback to summary
public String getTypeName()

Return the type name of the parameter, if any.

isInputValueProvidedback to summary
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.

isResultsParameterback 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 false.