Home » Search

About TypedQuery

11-20 of 139Refresh
JPA Doc
65

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
65

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
65

setParameter(param, value, temporalType)

Method javax.persistence.TypedQuery TypedQuery 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
JPA Doc
65

setParameter(param, value, temporalType)

Method javax.persistence.TypedQuery TypedQuery setParameter(   Parameter param,   Calendar value,   TemporalType temporalType ) Bind an instance of java.util.Calendar to a Parameter object. Parameters: param - parameter object value - parameter value temporalType - temporal type
JPA Doc
65

setParameter(position, value)

Method javax.persistence.TypedQuery TypedQuery setParameter(   int position,   Object value ) Bind an argument to a positional parameter. Parameters: position - position value - parameter value Returns: the same query instance Throws: IllegalArgumentException - if position does not correspond
JPA Doc
65

setParameter(position, value, temporalType)

Method javax.persistence.TypedQuery TypedQuery setParameter(   int position,   Calendar value,   TemporalType temporalType ) Bind an instance of java.util.Calendar to a positional parameter. Parameters: position - position value - parameter value temporalType - temporal type Returns: the same
JPA Doc
65

setParameter(position, value, temporalType)

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

getResultList()

Method javax.persistence.TypedQuery List getResultList() Execute a SELECT query and return the query results as a typed List. Returns: a list of the results Throws: IllegalStateException - if called for a Java Persistence query language UPDATE or DELETE statement QueryTimeoutException
JPA Doc
64

getSingleResult()

Method javax.persistence.TypedQuery X getSingleResult() Execute a SELECT query that returns a single result. Returns: the result Throws: NoResultException - if there is no result NonUniqueResultException - if more than one result IllegalStateException - if called for a Java Persistence query
Manual
41

JPA Query API

, which was the only interface available for representing queries in JPA 1, and the new TypedQuery interface that was introduced in JPA 2. The TypedQuery interface extends the Query interface. In JPA 2 the Query interface ... result type is expected queries should usually use the TypedQuery interface. It is easier to run