Top Description Fields Constructors Methods
org.springframework.jdbc.core.namedparam

public Class EmptySqlParameterSource

extends Object
implements SqlParameterSource
Class Inheritance
All Implemented Interfaces
org.springframework.jdbc.core.namedparam.SqlParameterSource
Imports
org.springframework.lang.Nullable

A simple empty implementation of the SqlParameterSource interface.
Author
Juergen Hoeller
Since
3.2.2

Field Summary

Modifier and TypeField and Description
public static final EmptySqlParameterSource
INSTANCE

A shared instance of EmptySqlParameterSource.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
getParameterNames()

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getParameterNames.

Enumerate all available parameter names if possible.

public int
getSqlType(String
the name of the parameter
paramName
)

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getSqlType.

Determine the SQL type for the specified named parameter.

public String
getTypeName(String
the name of the parameter
paramName
)

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getTypeName.

Determine the type name for the specified named parameter.

public Object
getValue(String
the name of the parameter
paramName
)

Implements org.springframework.jdbc.core.namedparam.SqlParameterSource.getValue.

Return the parameter value for the requested named parameter.

public boolean
hasValue(String
the name of the parameter
paramName
)

Implements org.springframework.jdbc.core.namedparam.SqlParameterSource.hasValue.

Determine whether there is a value for the specified named parameter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final EmptySqlParameterSource INSTANCE

A shared instance of EmptySqlParameterSource.

Constructor Detail

EmptySqlParameterSourceback to summary
public EmptySqlParameterSource()

Method Detail

getParameterNamesback to summary
public String[] getParameterNames()

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getParameterNames.

Doc from org.springframework.jdbc.core.namedparam.SqlParameterSource.getParameterNames.

Enumerate all available parameter names if possible.

This is an optional operation, primarily for use with org.springframework.jdbc.core.simple.SimpleJdbcInsert and org.springframework.jdbc.core.simple.SimpleJdbcCall.

Returns:String[]

the array of parameter names, or null if not determinable

Annotations
@Override
@Nullable
getSqlTypeback to summary
public int getSqlType(String paramName)

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getSqlType.

Doc from org.springframework.jdbc.core.namedparam.SqlParameterSource.getSqlType.

Determine the SQL type for the specified named parameter.

Parameters
paramName:String

the name of the parameter

Returns:int

the SQL type of the specified parameter, or TYPE_UNKNOWN if not known

Annotations
@Override
getTypeNameback to summary
public String getTypeName(String paramName)

Overrides default org.springframework.jdbc.core.namedparam.SqlParameterSource.getTypeName.

Doc from org.springframework.jdbc.core.namedparam.SqlParameterSource.getTypeName.

Determine the type name for the specified named parameter.

Parameters
paramName:String

the name of the parameter

Returns:String

the type name of the specified parameter, or null if not known

Annotations
@Override
@Nullable
getValueback to summary
public Object getValue(String paramName) throws IllegalArgumentException

Implements org.springframework.jdbc.core.namedparam.SqlParameterSource.getValue.

Doc from org.springframework.jdbc.core.namedparam.SqlParameterSource.getValue.

Return the parameter value for the requested named parameter.

Parameters
paramName:String

the name of the parameter

Returns:Object

the value of the specified parameter

Annotations
@Override
@Nullable
Exceptions
IllegalArgumentException:
if there is no value for the requested parameter
hasValueback to summary
public boolean hasValue(String paramName)

Implements org.springframework.jdbc.core.namedparam.SqlParameterSource.hasValue.

Doc from org.springframework.jdbc.core.namedparam.SqlParameterSource.hasValue.

Determine whether there is a value for the specified named parameter.

Parameters
paramName:String

the name of the parameter

Returns:boolean

whether there is a value defined

Annotations
@Override