|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Query
Interface used to control query execution.
Method Summary | |
---|---|
int |
executeUpdate()
Execute an update or delete statement. |
java.util.List |
getResultList()
Execute a SELECT query and return the query results as a List. |
java.lang.Object |
getSingleResult()
Execute a SELECT query that returns a single result. |
Query |
setFirstResult(int startPosition)
Set the position of the first result to retrieve. |
Query |
setFlushMode(FlushModeType flushMode)
Set the flush mode type to be used for the query execution. |
Query |
setHint(java.lang.String hintName,
java.lang.Object value)
Set an implementation-specific hint. |
Query |
setMaxResults(int maxResult)
Set the maximum number of results to retrieve. |
Query |
setParameter(int position,
java.util.Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a positional parameter. |
Query |
setParameter(int position,
java.util.Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a positional parameter. |
Query |
setParameter(int position,
java.lang.Object value)
Bind an argument to a positional parameter. |
Query |
setParameter(java.lang.String name,
java.util.Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a named parameter. |
Query |
setParameter(java.lang.String name,
java.util.Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a named parameter. |
Query |
setParameter(java.lang.String name,
java.lang.Object value)
Bind an argument to a named parameter. |
Method Detail |
---|
java.util.List getResultList()
java.lang.IllegalStateException
- if called for a Java
Persistence query language UPDATE or DELETE statementjava.lang.Object getSingleResult()
NoResultException
- if there is no result
NonUniqueResultException
- if more than one result
java.lang.IllegalStateException
- if called for a Java
Persistence query language UPDATE or DELETE statementint executeUpdate()
java.lang.IllegalStateException
- if called for a Java
Persistence query language SELECT statement
TransactionRequiredException
- if there is
no transactionQuery setMaxResults(int maxResult)
maxResult
-
java.lang.IllegalArgumentException
- if argument is negativeQuery setFirstResult(int startPosition)
startPosition
- the start position of the first result, numbered from 0
java.lang.IllegalArgumentException
- if argument is negativeQuery setHint(java.lang.String hintName, java.lang.Object value)
hintName
- value
-
java.lang.IllegalArgumentException
- if the second argument is not
valid for the implementationQuery setParameter(java.lang.String name, java.lang.Object value)
name
- the parameter namevalue
-
java.lang.IllegalArgumentException
- if parameter name does not
correspond to parameter in query string
or argument is of incorrect typeQuery setParameter(java.lang.String name, java.util.Date value, TemporalType temporalType)
name
- value
- temporalType
-
java.lang.IllegalArgumentException
- if parameter name does not
correspond to parameter in query stringQuery setParameter(java.lang.String name, java.util.Calendar value, TemporalType temporalType)
name
- value
- temporalType
-
java.lang.IllegalArgumentException
- if parameter name does not
correspond to parameter in query stringQuery setParameter(int position, java.lang.Object value)
position
- value
-
java.lang.IllegalArgumentException
- if position does not
correspond to positional parameter of query
or argument is of incorrect typeQuery setParameter(int position, java.util.Date value, TemporalType temporalType)
position
- value
- temporalType
-
java.lang.IllegalArgumentException
- if position does not
correspond to positional parameter of queryQuery setParameter(int position, java.util.Calendar value, TemporalType temporalType)
position
- value
- temporalType
-
java.lang.IllegalArgumentException
- if position does not
correspond to positional parameter of queryQuery setFlushMode(FlushModeType flushMode)
flushMode
-
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |