ObjectDB Database Search

1-50 of 200 results

FROM clause (JPQL / Criteria API)

The FROM clause declares query identification variables that represent iteration over objects in ... are always polymorphic. JPQL does not provide a way to exclude descendant classes from iteration at the FROM clause level. JPA 2, however, adds support for filtering instances of specific types

Criteria Query From Elements

The interfaces in this group are in use for setting a criteria query FROM clause. Criteria Query Variables The FROM clause  in JPA queries (as in SQL) defines the query variables. Query variables are represented in criteria queries by descendant interfaces of the From interface: Range

jakarta.persistence.criteria.From

Jakarta Persistence (JPA) Interface jakarta.persistence.criteria. From Type Parameters ... , TupleElement Represents a bound type, usually an entity that appears in the from clause, but may also be an embeddable belonging to an entity in the from clause. Serves as a factory for Join s of associations

jakarta.persistence.criteria.From.getCorrelationParent()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From From getCorrelationParent() Returns the parent From object from which the correlated From object has been obtained through correlation (use of Subquery.correlate method). Returns: the parent of the correlated From object. Throws

jakarta.persistence.criteria.From.getJoins()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Set getJoins() Return the joins that have been made from this bound type. Returns empty set if no joins have been made from this bound type. Modifications to the set do not affect the query. Returns: joins made from this type. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.isCorrelated()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From boolean isCorrelated() Whether the From object has been obtained as a result of correlation (use of a Subquery.correlate method). Returns: boolean indicating whether the object has been obtained through correlation. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.AbstractQuery.from(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery Root from (    Class entityClass ) Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots. Parameters: entityClass - the entity class Returns: query

jakarta.persistence.criteria.AbstractQuery.from(EntityType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery Root from (    EntityType entity ) Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots. Parameters: entity - metamodel entity representing

jakarta.persistence.criteria.From.joinMap(String,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From MapJoin joinMap (    String attributeName ,    JoinType jt ) Create a join to the specified Map -valued attribute using the given join type. Parameters: attributeName - name of the attribute for the target

jakarta.persistence.criteria.From.join(EntityType,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    EntityType entity ,    JoinType joinType ) Create and add a join to the given entity. Parameters: entity - metamodel entity representing the join target joinType - join type Returns: the resulting join. Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.criteria.From.join(SingularAttribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    SingularAttribute attribute ) Create an inner join to the specified single-valued attribute. Parameters: attribute - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(SingularAttribute,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    SingularAttribute attribute ,    JoinType jt ) Create a join to the specified single-valued attribute using the given join type. Parameters: jt - join type attribute - target of the join

jakarta.persistence.criteria.From.join(CollectionAttribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From CollectionJoin join (    CollectionAttribute collection ) Create an inner join to the specified Collection -valued attribute. Parameters: collection - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    Class entityClass ) Create and add an inner join to the given entity. Parameters: entityClass - the target entity class Returns: the resulting join. Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.criteria.From.join(Class,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    Class entityClass ,    JoinType joinType ) Create and add a join to the given entity. Parameters: entityClass - the target entity class joinType - join type Returns: the resulting join. Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.criteria.From.join(EntityType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    EntityType entity ) Create and add an inner join to the given entity. Parameters: entity - metamodel entity representing the join target Returns: the resulting join. Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.criteria.From.join(SetAttribute,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From SetJoin join (    SetAttribute set ,    JoinType jt ) Create a join to the specified Set -valued attribute using the given join type. Parameters: jt - join type set - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(ListAttribute,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From ListJoin join (    ListAttribute list ,    JoinType jt ) Create a join to the specified List -valued attribute using the given join type. Parameters: jt - join type list - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(MapAttribute,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From MapJoin join (    MapAttribute map ,    JoinType jt ) Create a join to the specified Map -valued attribute using the given join type. Parameters: jt - join type map - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    String attributeName ) Create an inner join to the specified attribute. Parameters: attributeName - name of the attribute for the target of the join Returns: the resulting join. Throws

jakarta.persistence.criteria.From.join(SetAttribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From SetJoin join (    SetAttribute set ) Create an inner join to the specified Set -valued attribute. Parameters: set - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(ListAttribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From ListJoin join (    ListAttribute list ) Create an inner join to the specified List -valued attribute. Parameters: list - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(MapAttribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From MapJoin join (    MapAttribute map ) Create an inner join to the specified Map -valued attribute. Parameters: map - target of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.From.join(CollectionAttribute,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From CollectionJoin join (    CollectionAttribute collection ,    JoinType jt ) Create a join to the specified Collection -valued attribute using the given join type. Parameters: jt - join type collection - target

jakarta.persistence.criteria.From.join(String,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From Join join (    String attributeName ,    JoinType jt ) Create a join to the specified attribute using the given join type. Parameters: attributeName - name of the attribute for the target of the join jt

jakarta.persistence.criteria.From.joinCollection(String,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From CollectionJoin joinCollection (    String attributeName ,    JoinType jt ) Create a join to the specified Collection -valued attribute using the given join type. Parameters: attributeName - name

jakarta.persistence.criteria.From.joinSet(String,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From SetJoin joinSet (    String attributeName ,    JoinType jt ) Create a join to the specified Set -valued attribute using the given join type. Parameters: attributeName - name of the attribute for the target

jakarta.persistence.criteria.From.joinList(String,JoinType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From ListJoin joinList (    String attributeName ,    JoinType jt ) Create a join to the specified List -valued attribute using the given join type. Parameters: attributeName - name of the attribute for the target

jakarta.persistence.criteria.From.joinCollection(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From CollectionJoin joinCollection (    String attributeName ) Create an inner join to the specified Collection -valued attribute. Parameters: attributeName - name of the attribute for the target of the join Returns

jakarta.persistence.criteria.From.joinSet(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From SetJoin joinSet (    String attributeName ) Create an inner join to the specified Set -valued attribute. Parameters: attributeName - name of the attribute for the target of the join Returns: the resulting join. Throws

jakarta.persistence.criteria.From.joinList(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From ListJoin joinList (    String attributeName ) Create an inner join to the specified List -valued attribute. Parameters: attributeName - name of the attribute for the target of the join Returns: the resulting join

jakarta.persistence.criteria.From.joinMap(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. From MapJoin joinMap (    String attributeName ) Create an inner join to the specified Map -valued attribute. Parameters: attributeName - name of the attribute for the target of the join Returns: the resulting join. Throws

jakarta.persistence.criteria.CriteriaUpdate.from(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaUpdate Root from (    Class entityClass ) Create and add a query root corresponding to the entity that is the target of the update. A CriteriaUpdate object has a single root, the entity that is being updated

jakarta.persistence.criteria.CriteriaUpdate.from(EntityType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaUpdate Root from (    EntityType entity ) Create and add a query root corresponding to the entity that is the target of the update. A CriteriaUpdate object has a single root, the entity that is being updated

jakarta.persistence.criteria.CriteriaDelete.from(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaDelete Root from (    Class entityClass ) Create and add a query root corresponding to the entity that is the target of the DELETE. A CriteriaDelete object has a single root, the entity that is being deleted

jakarta.persistence.criteria.CriteriaDelete.from(EntityType)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaDelete Root from (    EntityType entity ) Create and add a query root corresponding to the entity that is the target of the DELETE. A CriteriaDelete object has a single root, the entity that is being deleted

Retrieving JPA Entity Objects

The Java Persistence API (JPA) provides various ways to retrieve objects from the database ... with data that is retrieved from the database (or from the L2 cache - if enabled). The new entity object ... is returned as is. Otherwise, the object data is retrieved from the database and a new managed entity object

SELECT clause (JPQL / Criteria API)

= em. createQuery ("SELECT c FROM Country c", Country.class); List results = query. getResultList ... country names as String instances, rather than Country objects: SELECT c.name FROM Country AS c Using ... are extracted from (or projected out of) entity objects to form the query results. The results

Paths and Types in JPQL and Criteria API

classes) are represented in JPQL by the following types of expressions: Variables - FROM ... are assigned as arguments. Path expressions that navigate from one object to another. Instances of user ... . For example, c.capital.name is a nested path expression that continues from the Capital entity object

ORDER BY clause (JPQL / Criteria API)

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 ... are ordered by evaluation of the ORDER BY expressions. Only expressions that are derived directly from

DELETE Queries in JPA/JPQL

As explained in chapter 2 , entity objects can be deleted from the database by: Retrieving the entity objects into an EntityManager . Removing these objects from the EntityManager   ... , which are used to retrieve data from the database, DELETE queries do not retrieve data from

WHERE clause (JPQL / Criteria API)

The WHERE clause adds filtering capabilities to the FROM -SELECT structure. It is essential in any JPQL query that retrieves selective objects from the database. Out of the four optional clauses ... : SELECT c FROM Country c WHERE c.population :p The FROM clause of this query defines an iteration

GROUP BY and HAVING clauses

clause in the query execution order is after the FROM and WHERE clauses, but before the SELECT ... ) that are generated by the FROM clause iteration and pass the WHERE clause filtering (if any ... .name, 1, 1) FROM Country c GROUP BY SUBSTRING(c.name, 1, 1); The FROM clause defines iteration

Database Schema Evolution

from int to Date ) the fields are not considered as matching and the new field is initialized with a default value ( 0 , false or null ). The following type conversions are supported: From any numeric ... and enum values that are stored as numeric ordinal values (the default). From any type to Boolean or

JPA Query Structure (JPQL / Criteria)

rather than just field values from database tables, as with SQL. That makes JPQL more object oriented friendly ... ;of up to 6 clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The first two clauses, SELECT and FROM are required in every retrieval query

jakarta.persistence.criteria.PluralJoin

, From , Path , FetchParent , Expression , Selection , TupleElement The PluralJoin interface defines ... reassigned. Returns the same selection item. Inherited from Selection Parameters: name - alias ... failure. Inherited from Expression Parameters: type - intended type of the expression Returns: new

jakarta.persistence.criteria.MapJoin

Interfaces: PluralJoin , Join , From , Path , FetchParent , Expression , Selection , TupleElement ... , an alias cannot be changed or reassigned. Returns the same selection item. Inherited from Selection ... : may result in a runtime failure. Inherited from Expression Parameters: type - intended type

jakarta.persistence.criteria.SetJoin

, From , Path , FetchParent , Expression , Selection , TupleElement The SetJoin interface is the type ... reassigned. Returns the same selection item. Inherited from Selection Parameters: name - alias Returns ... . Inherited from Expression Parameters: type - intended type of the expression Returns: new expression

jakarta.persistence.criteria.CollectionJoin

: PluralJoin , Join , From , Path , FetchParent , Expression , Selection , TupleElement The CollectionJoin ... cannot be changed or reassigned. Returns the same selection item. Inherited from Selection ... : may result in a runtime failure. Inherited from Expression Parameters: type - intended type

jakarta.persistence.criteria.ListJoin

, From , Path , FetchParent , Expression , Selection , TupleElement The ListJoin interface is the type ... reassigned. Returns the same selection item. Inherited from Selection Parameters: name - alias Returns ... . Inherited from Expression Parameters: type - intended type of the expression Returns: new