Package com.randomnoun.common.db
Class SqlWithArguments
java.lang.Object
com.randomnoun.common.db.SqlWithArguments
A container class for SQL with positional placeholders, and the arguments to be substituted
into those placeholders, to be used in a JdbcTemplate.
- Author:
- knoxg
-
Constructor Summary
ConstructorsConstructorDescriptionSqlWithArguments(String sql, Object[] args, int[] argTypes) Create a new SqlWithArguments object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanObject[]getArgs()Return the arguments to be substituted into the SQL placeholdersint[]Return the SQL datatypes of the arguments (as java.sql.Types constants)getSql()Return the SQL, containing '?' positional placeholdersinthashCode()voidvoidsetArgTypes(int[] argTypes) void
-
Constructor Details
-
SqlWithArguments
Create a new SqlWithArguments object.- Parameters:
sql- the SQL, containing '?' positional placeholdersargs- the arguments to be substituted into those placeholdersargTypes- the SQL datatypes of the arguments (as java.sql.Types constants)
-
-
Method Details
-
getSql
Return the SQL, containing '?' positional placeholders- Returns:
- the SQL, containing '?' positional placeholders
-
getArgs
Return the arguments to be substituted into the SQL placeholders- Returns:
- the arguments to be substituted into the SQL placeholders
-
getArgTypes
Return the SQL datatypes of the arguments (as java.sql.Types constants)- Returns:
- the SQL datatypes of the arguments (as java.sql.Types constants)
-
setSql
-
setArgs
-
setArgTypes
-
hashCode
-
equals
-