Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created April 5, 2016 18:53
Show Gist options
  • Save sebersole/d26d3d8b290d8ecde8f80a5209dd3a9b to your computer and use it in GitHub Desktop.
Save sebersole/d26d3d8b290d8ecde8f80a5209dd3a9b to your computer and use it in GitHub Desktop.
Query#setParameter "extras"
/**
* Bind a positional String-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setString(int position, String val);
/**
* Bind a positional char-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setCharacter(int position, char val);
/**
* Bind a positional boolean-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setBoolean(int position, boolean val);
/**
* Bind a positional byte-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setByte(int position, byte val);
/**
* Bind a positional short-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setShort(int position, short val);
/**
* Bind a positional int-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setInteger(int position, int val);
/**
* Bind a positional long-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setLong(int position, long val);
/**
* Bind a positional float-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setFloat(int position, float val);
/**
* Bind a positional double-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setDouble(int position, double val);
/**
* Bind a positional binary-valued parameter.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setBinary(int position, byte[] val);
/**
* Bind a positional String-valued parameter using streaming.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setText(int position, String val);
/**
* Bind a positional binary-valued parameter using serialization.
*
* @param position The parameter position
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setSerializable(int position, Serializable val);
/**
* Bind a positional Locale-valued parameter.
*
* @param position The parameter position
* @param locale The bind value
*
* @return {@code this}, for method chaining
*/
Query setLocale(int position, Locale locale);
/**
* Bind a positional BigDecimal-valued parameter.
*
* @param position The parameter position
* @param number The bind value
*
* @return {@code this}, for method chaining
*/
Query setBigDecimal(int position, BigDecimal number);
/**
* Bind a positional BigDecimal-valued parameter.
*
* @param position The parameter position
* @param number The bind value
*
* @return {@code this}, for method chaining
*/
Query setBigInteger(int position, BigInteger number);
/**
* Bind a positional Date-valued parameter using just the Date portion.
*
* @param position The parameter position
* @param date The bind value
*
* @return {@code this}, for method chaining
*/
Query setDate(int position, Date date);
/**
* Bind a positional Date-valued parameter using just the Time portion.
*
* @param position The parameter position
* @param date The bind value
*
* @return {@code this}, for method chaining
*/
Query setTime(int position, Date date);
/**
* Bind a positional Date-valued parameter using the full Timestamp.
*
* @param position The parameter position
* @param date The bind value
*
* @return {@code this}, for method chaining
*/
Query setTimestamp(int position, Date date);
/**
* Bind a positional Calendar-valued parameter using the full Timestamp portion.
*
* @param position The parameter position
* @param calendar The bind value
*
* @return {@code this}, for method chaining
*/
Query setCalendar(int position, Calendar calendar);
/**
* Bind a positional Calendar-valued parameter using just the Date portion.
*
* @param position The parameter position
* @param calendar The bind value
*
* @return {@code this}, for method chaining
*/
Query setCalendarDate(int position, Calendar calendar);
/**
* Bind a named String-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setString(String name, String val);
/**
* Bind a named char-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setCharacter(String name, char val);
/**
* Bind a named boolean-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setBoolean(String name, boolean val);
/**
* Bind a named byte-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setByte(String name, byte val);
/**
* Bind a named short-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setShort(String name, short val);
/**
* Bind a named int-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setInteger(String name, int val);
/**
* Bind a named long-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setLong(String name, long val);
/**
* Bind a named float-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setFloat(String name, float val);
/**
* Bind a named double-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setDouble(String name, double val);
/**
* Bind a named binary-valued parameter.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setBinary(String name, byte[] val);
/**
* Bind a named String-valued parameter using streaming.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setText(String name, String val);
/**
* Bind a named binary-valued parameter using serialization.
*
* @param name The parameter name
* @param val The bind value
*
* @return {@code this}, for method chaining
*/
Query setSerializable(String name, Serializable val);
/**
* Bind a named Locale-valued parameter.
*
* @param name The parameter name
* @param locale The bind value
*
* @return {@code this}, for method chaining
*/
Query setLocale(String name, Locale locale);
/**
* Bind a named BigDecimal-valued parameter.
*
* @param name The parameter name
* @param number The bind value
*
* @return {@code this}, for method chaining
*/
Query setBigDecimal(String name, BigDecimal number);
/**
* Bind a named BigInteger-valued parameter.
*
* @param name The parameter name
* @param number The bind value
*
* @return {@code this}, for method chaining
*/
Query setBigInteger(String name, BigInteger number);
/**
* Bind the date (time is truncated) of a given Date object to a named query parameter.
*
* @param name The name of the parameter
* @param date The date object
*
* @return {@code this}, for method chaining
*/
Query setDate(String name, Date date);
/**
* Bind the time (date is truncated) of a given Date object to a named query parameter.
*
* @param name The name of the parameter
* @param date The date object
*
* @return {@code this}, for method chaining
*/
Query setTime(String name, Date date);
/**
* Bind the date and the time of a given Date object to a named query parameter.
*
* @param name The name of the parameter
* @param date The date object
*
* @return {@code this}, for method chaining
*/
Query setTimestamp(String name, Date date);
/**
* Bind a named Calendar-valued parameter using the full Timestamp.
*
* @param name The parameter name
* @param calendar The bind value
*
* @return {@code this}, for method chaining
*/
Query setCalendar(String name, Calendar calendar);
/**
* Bind a named Calendar-valued parameter using just the Date portion.
*
* @param name The parameter name
* @param calendar The bind value
*
* @return {@code this}, for method chaining
*/
Query setCalendarDate(String name, Calendar calendar);
/**
* Bind an instance of a mapped persistent class to a JDBC-style query parameter.
* Use {@link #setParameter(int, Object)} for null values.
*
* @param position the position of the parameter in the query
* string, numbered from <tt>0</tt>.
* @param val a non-null instance of a persistent class
*
* @return {@code this}, for method chaining
*/
Query setEntity(int position, Object val);
/**
* Bind an instance of a mapped persistent class to a named query parameter. Use
* {@link #setParameter(String, Object)} for null values.
*
* @param name the name of the parameter
* @param val a non-null instance of a persistent class
*
* @return {@code this}, for method chaining
*/
Query setEntity(String name, Object val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment