Home » Search

About setParameter

1-10 of 95Refresh
Manual
85

Query Parameters in JPA

( "SELECT c FROM Country c WHERE c.name = :name", Country.class); return query.setParameter ... for a real value. Before the query can be executed a parameter value has to be set using the setParameter method. The setParameter method supports method chaining (by returning the same TypedQuery instance
JPA Doc
62

setParameter(name, value)

Method javax.persistence.Query Query setParameter(   String name,   Object value ) Bind an argument to a named parameter. Parameters: name - parameter name value - parameter value Returns: the same query instance Throws: IllegalArgumentException - if the parameter name does not correspond
JPA Doc
62

setParameter(name, value)

Method javax.persistence.TypedQuery TypedQuery setParameter(   String name,   Object value ) Bind an argument to a named parameter. Parameters: name - parameter name value - parameter value Returns: the same query instance Throws: IllegalArgumentException - if the parameter name does not
JPA Doc
62

setParameter(name, value, temporalType)

Method javax.persistence.Query Query setParameter(   String name,   Date value,   TemporalType temporalType ) Bind an instance of java.util.Date to a named parameter. Parameters: name - parameter name value - parameter value temporalType - temporal type Returns: the same query instance Throws
JPA Doc
62

setParameter(name, value, temporalType)

Method javax.persistence.Query Query setParameter(   String name,   Calendar value,   TemporalType temporalType ) Bind an instance of java.util.Calendar to a named parameter. Parameters: name - parameter name value - parameter value temporalType - temporal type Returns: the same query instance
JPA Doc
62

setParameter(name, value, temporalType)

Method javax.persistence.TypedQuery TypedQuery setParameter(   String name,   Calendar value,   TemporalType temporalType ) Bind an instance of java.util.Calendar to a named parameter. Parameters: name - parameter name value - parameter value temporalType - temporal type Returns: the same query
JPA Doc
62

setParameter(name, value, temporalType)

Method javax.persistence.TypedQuery TypedQuery setParameter(   String name,   Date value,   TemporalType temporalType ) Bind an instance of java.util.Date to a named parameter. Parameters: name - parameter name value - parameter value temporalType - temporal type Returns: the same query instance
JPA Doc
62

setParameter(param, value)

Method javax.persistence.Query Query setParameter(   Parameter param,   T value ) Bind the value of a Parameter object. Parameters: param - parameter object value - parameter value Returns: the same query instance Throws: IllegalArgumentException - if the parameter does not correspond to a parameter of the query Since: JPA 2.0
JPA Doc
62

setParameter(param, value)

Method javax.persistence.TypedQuery TypedQuery setParameter(   Parameter param,   T value ) Bind the value of a Parameter object. Parameters: param - parameter object value - parameter value Returns: the same query instance Throws: IllegalArgumentException - if the parameter does not correspond to a parameter of the query Since: JPA 2.0
JPA Doc
62

setParameter(param, value, temporalType)

Method javax.persistence.Query Query setParameter(   Parameter param,   Date value,   TemporalType temporalType ) Bind an instance of java.util.Date to a Parameter object. Parameters: param - parameter object value - parameter value temporalType - temporal type Returns: the same query