com.github.marchenkoprojects.prettyjdbc.query.NamedParameterQuerySetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prettyjdbc Show documentation
Show all versions of prettyjdbc Show documentation
PrettyJDBC is a library that provides a simple and transparent way to work with a relational database.
The library is a lightweight wrapper over JDBC technology.
The newest version!
package com.github.marchenkoprojects.prettyjdbc.query;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
/**
* This internal interface provides methods for setting parameter values by name in a specific {@link NamedParameterQuery}.
*
* @param type of return query to perform call chain
*
* @author Oleg Marchenko
*/
interface NamedParameterQuerySetter {
/**
* Sets the designated parameter by name to the given Java boolean
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, boolean value);
/**
* Sets the designated parameter by name to the given Java byte
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, byte value);
/**
* Sets the designated parameter by name to the given Java short
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, short value);
/**
* Sets the designated parameter by name to the given Java int
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, int value);
/**
* Sets the designated parameter by name to the given Java long
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, long value);
/**
* Sets the designated parameter by name to the given Java float
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, float value);
/**
* Sets the designated parameter by name to the given Java double
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, double value);
/**
* Sets the designated parameter by name to the given Java {@link BigDecimal} value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, BigDecimal value);
/**
* Sets the designated parameter by name to the given Java String
value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, String value);
/**
* Sets the designated parameter by name to the given Java array of bytes.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, byte[] value);
/**
* Sets the designated parameter by name to the given Java {@link Date} value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, Date value);
/**
* Sets the designated parameter by name to the given Java {@link LocalDate} value as {@link Date}.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, LocalDate value);
/**
* Sets the designated parameter by name to the given Java {@link Time} value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, Time value);
/**
* Sets the designated parameter by name to the given Java {@link LocalTime} value as {@link Time}.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, LocalTime value);
/**
* Sets the designated parameter by name to the given Java {@link Timestamp} value.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, Timestamp value);
/**
* Sets the designated parameter by name to the given Java {@link LocalDateTime} value as {@link Timestamp}.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, LocalDateTime value);
/**
* Sets the value of the designated parameter by name with the given object.
*
* @param paramName the name of the parameter
* @param value the parameter value
* @return instance of this query
*/
Q setParameter(String paramName, Object value);
}