About TypedQuery

11-20 of 143Refresh
JPA Doc
64

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
64

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
64

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
64

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
64

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
63

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
63

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
39

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
Manual
34

Running JPA Queries [2011-09-21]

. Similarly, the TypedQuery interface defines the following methods: TypedQuery.getSingleResult - for use when exactly one result object is expected. TypedQuery.getResultList - for general use in any ... result objects are expected, the query should be run using the getResultList method: TypedQuery
Manual
34

Running JPA Queries

. Similarly, the TypedQuery interface defines the following methods: TypedQuery.getSingleResult - for use when exactly one result object is expected. TypedQuery.getResultList - for general use in any ... result objects are expected, the query should be run using the getResultList method: TypedQuery