ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
243

Query Parameters in JPA

Query parameters enable the definition of reusable queries. Such queries can be executed with different parameter values to retrieve different results. Running the same query multiple times with different parameter values (arguments) is more efficient than using a new query string for every query
70

javax.persistence.Parameter

javax.persistence Interface Parameter<T> Subinterfaces: ParameterExpression Type for query parameter objects. Since: JPA 2.0 See Also: Query TypedQuery Learn how to define and use JPA/JPQL queries in Chapter 4 of the ObjectDB/JPA manual. String getName() Return the parameter name, or null
68

parameter(paramClass, name)

Method javax.persistence.criteria.CriteriaBuilder ParameterExpression<T> parameter( Class<T> paramClass, String name ) Create a parameter expression with the given name. Parameters: paramClass - parameter class name - name that can be used to refer to the parameter Returns: parameter expression Since: JPA 2.0
67

getPosition()

Method javax.persistence.Parameter Integer getPosition() Return the parameter position, or null if the parameter is not a positional parameter. Returns: position of parameter Since: JPA 2.0
6

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

candidateCollectionExpression, String... parameters ) Add a subquery to this query. A subquery is composed as ... . The query parameter instance is unmodified as a result of the addSubquery or subsequent execution ... include the candidate class, filter, parameter declarations, variable declarations, imports, ordering
6

executeWithArray(parameters)

Method javax.jdo.Query Object executeWithArray( Object... parameters ) Execute the query and return the filtered Collection. The execution of the query obtains the values of the parameters and matches them against the declared parameters in order. The names of the declared parameters are ignored
6

declareParameters(parameters)

Method javax.jdo.Query void declareParameters( String parameters ) Declare the list of parameters query execution. The parameter declaration is a String containing one or more query parameter declarations separated with commas. Each parameter named in the parameter declaration must be bound
6

executeWithMap(parameters)

Method javax.jdo.Query Object executeWithMap( Map parameters ) Execute the query and return the filtered Collection. The query is executed with the parameters set by the Map values. Each Map entry consists of a key which is the name of the parameter in the declareParameters method, and a value
6

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

candidateCollectionExpression, Map parameters ) Add a subquery to this query. The Map version of the method treats the key of each map entry as the name of the parameter in the subquery, with or ... is the empty String for either the parameter or the value of the String[], or for any map key or value
6

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameter)

candidateCollectionExpression, String parameter ) Add a subquery to this query. The String version of the method binds the named expression to the parameter implictly or explicitly declared in the subquery. Parameters: sub - the subquery to add to this Query variableDeclaration - the name of the variable

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support