Home » Search

About TypedQuery

1-10 of 139Refresh
Manual
92

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
JPA Doc
81

javax.persistence.TypedQuery

javax.persistence Interface TypedQuery Superinterfaces: Query Interface used to control ... TypedQuery setFirstResult(int startPosition) Set the position of the first result to retrieve. Set ... . Parameters: flushMode - flush mode Returns: the same query instance Since: JPA 1.0 TypedQuery
JPA Doc
81

JPA Queries

Queries are represented in JPA by the Query and TypedQuery interfaces: The JPA Query API section ... these interfaces to build and run JPQL queries. The TypedQuery interface (or alternatively the older Query ... , representing query elements. Running criteria queries, however, still requires a TypedQuery or a Query
JPA Doc
71

setFirstResult(startPosition)

Method javax.persistence.TypedQuery TypedQuery setFirstResult(   int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance Throws: IllegalArgumentException - if the argument is negative Since: JPA 2.0
JPA Doc
71

setFlushMode(flushMode)

Method javax.persistence.TypedQuery TypedQuery setFlushMode(   FlushModeType flushMode ) Set the flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager. Parameters: flushMode - flush mode Returns: the same query instance Since: JPA 2.0
JPA Doc
71

setHint(hintName, value)

Method javax.persistence.TypedQuery TypedQuery setHint(   String hintName,   Object value ) Set a query property or hint. The hints elements may be used to specify query properties and hints. Properties defined by this specification must be observed by the provider. Vendor-specific hints
JPA Doc
71

setLockMode(lockMode)

Method javax.persistence.TypedQuery TypedQuery setLockMode(   LockModeType lockMode ) Set the lock mode type to be used for the query execution. Parameters: lockMode - lock mode Returns: the same query instance Throws: IllegalStateException - if the query is found not to be a Java Persistence
JPA Doc
71

setMaxResults(maxResult)

Method javax.persistence.TypedQuery TypedQuery setMaxResults(   int maxResult ) Set the maximum number of results to retrieve. Parameters: maxResult - maximum number of results to retrieve Returns: the same query instance Throws: IllegalArgumentException - if the argument is negative Since: JPA 2.0
JPA Doc
71

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
71

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