Internal Website 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

javax.persistence.criteria.From

JPA Interface From Type Parameters: - the source type - the target type 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 Joins of associations, embeddables, and collections

From.getCorrelationParent() - JPA Method

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

From.getJoins() - JPA Method

JPA Method in javax.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. Return: joins made from this type Since: JPA 2.0

CriteriaBuilder.substring(x,from,len) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression substring (    Expression  x,     Expression   from ,     Expression  len ... at the specified position. First position is 1. Parameters: x - string expression from - start position

CriteriaBuilder.substring(x,from) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression substring (    Expression  x,     Expression   from ) Create an expression for substring ... position is 1. Parameters: x - string expression from - start position expression Return: expression corresponding to substring extraction Since: JPA 2.0

CriteriaBuilder.substring(x,from) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression substring (    Expression  x,    int  from ) Create an expression for substring extraction ... is 1. Parameters: x - string expression from - start position Return: expression corresponding to substring extraction Since: JPA 2.0

From.isCorrelated() - JPA Method

JPA Method in javax.persistence.criteria. From boolean isCorrelated () Whether the From object has been obtained as a result of correlation (use of a Subquery correlate method). Return: boolean indicating whether the object has been obtained through correlation Since: JPA 2.0

CriteriaBuilder.locate(x,pattern,from) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression locate (    Expression  x,     Expression  pattern,     Expression   from ... for string to be located from - expression for position at which to start search Return: expression corresponding to position Since: JPA 2.0

CriteriaBuilder.locate(x,pattern,from) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression locate (    Expression  x,    String pattern,    int  from ) Create ... is returned. Parameters: x - expression for string to be searched pattern - string to be located from

CriteriaBuilder.substring(x,from,len) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression substring (    Expression  x,    int  from ,    int len ) Create ... . First position is 1. Parameters: x - string expression from - start position len - length Return

CriteriaDelete.from(entity) - JPA Method

JPA Method in javax.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. Parameters: entity

CriteriaDelete.from(entityClass) - JPA Method

JPA Method in javax.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. Parameters: entityClass

From.join(set) - JPA Method

JPA Method in javax.persistence.criteria. From SetJoin join (    SetAttribute  set ) Create an inner join to the specified Set-valued attribute. Parameters: set - target of the join Return: the resulting join Since: JPA 2.0

From.join(collection) - JPA Method

JPA Method in javax.persistence.criteria. From CollectionJoin join (    CollectionAttribute  collection ) Create an inner join to the specified Collection-valued attribute. Parameters: collection - target of the join Return: the resulting join Since: JPA 2.0

From.join(attribute) - JPA Method

JPA Method in javax.persistence.criteria. From Join join (    SingularAttribute  attribute ) Create an inner join to the specified single-valued attribute. Parameters: attribute - target of the join Return: the resulting join Since: JPA 2.0

From.join(attribute,jt) - JPA Method

JPA Method in javax.persistence.criteria. From Join join (    SingularAttribute  attribute,     JoinType  jt ) Create a join to the specified single-valued attribute using the given join type. Parameters: attribute - target of the join jt - join type Return: the resulting join Since: JPA 2.0

From.join(map,jt) - JPA Method

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

From.join(set,jt) - JPA Method

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

From.join(list,jt) - JPA Method

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

From.join(collection,jt) - JPA Method

JPA Method in javax.persistence.criteria. From CollectionJoin join (    CollectionAttribute  collection,     JoinType  jt ) Create a join to the specified Collection-valued attribute using the given join type. Parameters: collection - target of the join jt - join type Return: the resulting join Since: JPA 2.0

From.join(list) - JPA Method

JPA Method in javax.persistence.criteria. From ListJoin join (    ListAttribute  list ) Create an inner join to the specified List-valued attribute. Parameters: list - target of the join Return: the resulting join Since: JPA 2.0

From.join(map) - JPA Method

JPA Method in javax.persistence.criteria. From MapJoin join (    MapAttribute  map ) Create an inner join to the specified Map-valued attribute. Parameters: map - target of the join Return: the resulting join Since: JPA 2.0

AbstractQuery.from(entity) - JPA Method

JPA Method in javax.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 the entity of type X

AbstractQuery.from(entityClass) - JPA Method

JPA Method in javax.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 Return: query root corresponding to the given entity Since: JPA 2.0

From.joinMap(attributeName) - JPA Method

JPA Method in javax.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 Return: the resulting join Throws

From.join(attributeName,jt) - JPA Method

JPA Method in javax.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 - join type

From.joinList(attributeName) - JPA Method

JPA Method in javax.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 Return: the resulting join Throws

From.joinCollection(attributeName) - JPA Method

JPA Method in javax.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 Return: the resulting join Throws

From.joinSet(attributeName) - JPA Method

JPA Method in javax.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 Return: the resulting join Throws

From.join(attributeName) - JPA Method

JPA Method in javax.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 Return: the resulting join Throws: IllegalArgumentException - if attribute of the given name does not exist Since: JPA 2.0

From.joinList(attributeName,jt) - JPA Method

JPA Method in javax.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

From.joinMap(attributeName,jt) - JPA Method

JPA Method in javax.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 of the join

From.joinSet(attributeName,jt) - JPA Method

JPA Method in javax.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 of the join

From.joinCollection(attributeName,jt) - JPA Method

JPA Method in javax.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 of the attribute

CriteriaUpdate.from(entity) - JPA Method

JPA Method in javax.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. Parameters: entity

CriteriaUpdate.from(entityClass) - JPA Method

JPA Method in javax.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. Parameters: entityClass

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

[ODB1] Chapter 6 - Persistent Objects

, every transient object that, at commit time, is reachable from a persistent object (using persistent fields ... . An embedded object cannot be shared by references from multiple objects. In addition, embedded objects ... or queried directly (an embedded object can only be retrieved using a reference from its containing

[ODB1] Chapter 9 - ObjectDB Explorer

on it to start the Explorer. You can also start the Explorer from the command line. For instance ... from the list of classes at the top of this window and see all its persistent fields ... definition. You can select elements from the auto completion list when you write the query filter

[ODB1] Chapter 8 - ObjectDB Server

these databases from remote machines by TCP/IP. More details about client server mode vs. embedded database ... as a Java program You can run the server as a Java program from the command line, as so: java -cp ... to the server only from the specified IP address. For instance, the "127.0.0.1" value

[ODB1] Chapter 3 - Persistent Classes

. Aside from the requirements described above, a persistent class is like any other Java class ... (even from a non persistent class), interface implementations, inner classes, etc. The class members ... can be used to exclude other fields from being stored in the database. It is recommended to explicitly