ObjectDB Database Search
1-50 of 200 resultsJPA Named Queries A named query is a statically defined query with a predefined unchangeable query string. Using named queries instead of dynamic queries may improve code organization by separating the JPQL ... whose name is "Country.findAll" that retrieves all the Country objects in the database | |
SELECT clause (JPQL / Criteria API) country names as String instances, rather than Country objects: SELECT c. name FROM Country AS c Using path expressions , such as c. name , in query results is referred to as projection. The field values ... c. name FROM Country AS c", String.class); List results = query. getResultList (); Only singular | |
Query Parameters in JPA execution, because it eliminates the need for repeated query compilations. Named Parameters (: name ) The following method retrieves a Country object from the database by its name : public Country getCountryByName( EntityManager em, String name ) { TypedQuery query = em. createQuery ( "SELECT c FROM | |
Schema Update ... ... A element has two roles: If the optional new- name attribute is specified, the package name is changed from the original name , which is specified by the required name attribute, to the new name . All the classes in that package are moved to the new package name . In addition, whether or not a new | |
FROM clause (JPQL / Criteria API), and the same query can also be written as follows: SELECT c FROM Country c By default, the name of an entity class in a JPQL query is the unqualified name of the class (e.g. just Country with no package name ). The default name can be overridden by specifying another name explicitly in the @Entity 's | |
ORDER BY clause (JPQL / Criteria API) Expressions The following query returns names of countries whose population size is at least one million people, ordered by the country name : SELECT c. name FROM Country c WHERE c.population 1000000 ORDER BY c. name When an ORDER BY clause exists it is the last to be executed. First the FROM clause | |
JPA Persistable Types, package or private) and it can be either concrete or abstract. Entity Class Names Entity classes are represented in queries by entity names . By default, the entity name is the unqualified name of the entity class (i.e. the short class name excluding the package name ). A different entity name | |
EntityManagerFactory.addNamedQuery(name,query) - JPA Method name , Query query ) Define the query, typed query, or stored procedure query as a named query such that future query objects can be created from it using the EntityManager ... of the query object (except for actual parameter binding) in effect when the named query is added | |
AnnotationAttrRef jakarta.persistence.JoinColumn.name JPA Annotation Attribute in jakarta.persistence.JoinColumn String name default "" (Optional) The name of the foreign key column. The table in which this column is found depends on the context ... is used): The concatenation of the following: the name of the referencing relationship property or field | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
ManagedType | |
AnnotationAttrRef jakarta.persistence.NamedEntityGraph.name JPA Annotation Attribute in jakarta.persistence.NamedEntityGraph String name default "" (Optional) The name used to identify the entity graph in calls to EntityManager.getEntityGraph . If no name is explicitly specified, the name defaults to the entity name of the annotated root entity. Entity | |
ManagedType | |
ManagedType | |
Query.getParameter(name) - JPA Method JPA Method in jakarta.persistence.Query Parameter getParameter ( String name ) Get the parameter object corresponding to the declared parameter of the given name . This method is not required to be supported for native queries. Parameters: name - parameter name Return: parameter | |
Query.getParameter(name,type) - JPA Method JPA Method in jakarta.persistence.Query Parameter getParameter ( String name ... of the given name and type. This method is required to be supported for criteria queries only. Parameters: name - parameter name type - type Return: parameter object Throws: IllegalArgumentException | |
Query.getParameterValue(name) - JPA Method JPA Method in jakarta.persistence.Query Object getParameterValue ( String name ) Return the input value bound to the named parameter. (Note that OUT parameters are unbound.) Parameters: name - parameter name Return: parameter value Throws: IllegalStateException - if the parameter | |
Query.setParameter(name,value,temporalType) - JPA Method JPA Method in jakarta.persistence.Query Query setParameter ( String name ,  ... an instance of java.util.Calendar to a named parameter. Parameters: name - parameter name value - parameter ... - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type Since: JPA 1.0 | |
Query.setParameter(name,value) - JPA Method JPA Method in jakarta.persistence.Query Query setParameter ( String name , Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Return: the same query instance Throws: IllegalArgumentException | |
Query.setParameter(name,value,temporalType) - JPA Method JPA Method in jakarta.persistence.Query Query setParameter ( String name ,  ... of java.util.Date to a named parameter. Parameters: name - parameter name value - parameter value ... - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type Since: JPA 1.0 | |
TypedQuery.setParameter(name,value) - JPA Method; name , Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Return: the same query instance Throws: IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the argument is of incorrect type Since: JPA 2.0 | |
StoredProcedureQuery.setParameter(name,value,temporalType) - JPA Method; String name , Date value, TemporalType temporalType ) Bind an instance of java.util.Date to a named parameter. Parameters: name - parameter name value - parameter value temporalType - temporal type Return: the same query instance Throws | |
StoredProcedureQuery.setParameter(name,value,temporalType) - JPA Method; 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 Return: the same query instance | |
StoredProcedureQuery.setParameter(name,value) - JPA Method; String name , Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Return: the same query instance Throws: IllegalArgumentException - if the parameter name does not correspond to a parameter of the query | |
TypedQuery.setParameter(name,value,temporalType) - JPA Method; name , Date value, TemporalType temporalType ) Bind an instance of java.util.Date to a named parameter. Parameters: name - parameter name value - parameter ... - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type Since: JPA 2.0 | |
TypedQuery.setParameter(name,value,temporalType) - JPA Method; name , Calendar value, TemporalType temporalType ) Bind an instance of java.util.Calendar to a named parameter. Parameters: name - parameter name value ... : IllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the value argument is of incorrect type Since: JPA 2.0 | |
AnnotationAttrRef jakarta.persistence.Entity.name JPA Annotation Attribute in jakarta.persistence.Entity String name default "" (Optional) The entity name . Defaults to the unqualified name of the entity class. This name is used to refer to the entity in queries. The name must not be a reserved literal in the Jakarta Persistence query language. Since: JPA 1.0 | |
EntityManager.createNamedQuery(name) - JPA Method; name ) Create an instance of Query for executing a named query written in the Jakarta Persistence query language or in native SQL. Parameters: name - the name of a query defined in metadata Return ... with the given name or if the query string is found to be invalid See Also: NamedQuery NamedNativeQuery Since: JPA 1.0 | |
AnnotationAttrRef jakarta.persistence.PrimaryKeyJoinColumn.name JPA Annotation Attribute in jakarta.persistence.PrimaryKeyJoinColumn String name default "" (Optional) The name of the primary key column of the current table. Defaults to the same name as the primary key column of the primary table of the superclass ( JOINED mapping strategy); the same name as | |
EntityManager.createNamedQuery(name,resultClass) - JPA Method name , Class resultClass ) Create an instance of TypedQuery for executing a Jakarta Persistence query language named query. The select list of the query must contain ... : name - the name of a query defined in metadata resultClass - the type of the query result Return | |
AnnotationAttrRef jakarta.persistence.CollectionTable.name JPA Annotation Attribute in jakarta.persistence.CollectionTable String name default "" (Optional) The name of the collection table. If not specified, it defaults to the concatenation of the name of the containing entity and the name of the collection attribute, separated by an underscore. Since: JPA 2.0 | |
CriteriaBuilder.parameter(paramClass,name) - JPA Method JPA Method in jakarta.persistence.criteria.CriteriaBuilder ParameterExpression parameter ( Class 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 Return: parameter expression Since: JPA 2.0 |