Save This Page
Home » apache-tomcat-6.0.26-src » javax » persistence » [javadoc | source]
javax.persistence
public interface: Query [javadoc | source] Interface used to control query execution.
Method from javax.persistence.Query Summary:
executeUpdate,   getResultList,   getSingleResult,   setFirstResult,   setFlushMode,   setHint,   setMaxResults,   setParameter,   setParameter,   setParameter,   setParameter,   setParameter,   setParameter
Method from javax.persistence.Query Detail:
 public int executeUpdate()
    Execute an update or delete statement.
 public List getResultList()
    Execute the query and return the query results as a List.
 public Object getSingleResult()
    Execute a SELECT query that returns a single result.
 public Query setFirstResult(int startPosition)
    Set the position of the first result to retrieve.
 public Query 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.
 public Query setHint(String hintName,
    Object value)
    Set an implementation-specific hint. If the hint name is not recognized, it is silently ignored.
 public Query setMaxResults(int maxResult)
    Set the maximum number of results to retrieve.
 public Query setParameter(String name,
    Object value)
    Bind an argument to a named parameter.
 public Query setParameter(int position,
    Object value)
    Bind an argument to a positional parameter.
 public Query setParameter(String name,
    Date value,
    TemporalType temporalType)
    Bind an instance of java.util.Date to a named parameter.
 public Query setParameter(String name,
    Calendar value,
    TemporalType temporalType)
    Bind an instance of java.util.Calendar to a named parameter.
 public Query setParameter(int position,
    Date value,
    TemporalType temporalType)
    Bind an instance of java.util.Date to a positional parameter.
 public Query setParameter(int position,
    Calendar value,
    TemporalType temporalType)
    Bind an instance of java.util.Calendar to a positional parameter.