org.apache.cayenne.jpa
Class JpaNativeQuery
java.lang.Object
org.apache.cayenne.jpa.JpaQuery
org.apache.cayenne.jpa.JpaNativeQuery
- All Implemented Interfaces:
- javax.persistence.Query
public class JpaNativeQuery
- extends JpaQuery
A JPA wrapper for Cayenne SQLTemplate
.
- Since:
- 3.0
- Author:
- Andrus Adamchik
Methods inherited from class org.apache.cayenne.jpa.JpaQuery |
executeUpdate, getResultList, getSingleResult, setFirstResult, setFlushMode, setHint, setMaxResults, setParameter, setParameter, setParameter, setParameter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
query
protected SQLTemplate query
parameters
protected Map<String,Object> parameters
JpaNativeQuery
public JpaNativeQuery(ObjectContext context,
String sqlString,
Class<?> resultClass)
JpaNativeQuery
public JpaNativeQuery(ObjectContext context,
String sqlString,
String dataMapName)
processSQLString
protected String processSQLString(String sqlString)
getQuery
protected Query getQuery()
- Specified by:
getQuery
in class JpaQuery
setParameter
public javax.persistence.Query setParameter(String name,
Object value)
- Description copied from class:
JpaQuery
- Bind an argument to a named parameter.
- Specified by:
setParameter
in interface javax.persistence.Query
- Specified by:
setParameter
in class JpaQuery
- Parameters:
name
- the parameter name
- Returns:
- the same query instance
setParameter
public javax.persistence.Query setParameter(int position,
Object value)
- Bind an argument to a positional parameter.
- Specified by:
setParameter
in interface javax.persistence.Query
- Specified by:
setParameter
in class JpaQuery
- Parameters:
position
- value
-
- Returns:
- the same query instance
- Throws:
IllegalArgumentException
- if position does not correspond to positional
parameter of query or argument is of incorrect type
Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.