From<Z,X>
- Type Parameters:
<Z>
- the source type<X>
- 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 belonging to the type, and for Paths of attributes belonging to the type.
- Since:
- JPA 2.0
Public Methods
- Parameters:
attribute
- target of the join
- Return:
- the resulting join
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
attribute
- target of the joinjt
- join type
- Return:
- the resulting join
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
attribute
- target of the join
- Return:
- the resulting fetch join
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
attribute
- target of the joinjt
- join type
- Return:
- the resulting fetch join
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
attributeName
- name of the attribute for the target of the join
- Return:
- the resulting fetch join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting fetch join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
- Parameters:
map
- map-valued attribute
- Return:
- expression corresponding to the referenced attribute
- Inherited from:
Path<X>
- Since:
- JPA 2.0
- Parameters:
collection
- collection-valued attribute
- Return:
- expression corresponding to the referenced attribute
- Inherited from:
Path<X>
- Since:
- JPA 2.0
Path<Y> get(SingularAttribute<?superX,Y> attribute)
- Parameters:
attribute
- single-valued attribute
- Return:
- path corresponding to the referenced attribute
- Inherited from:
Path<X>
- Since:
- JPA 2.0
Path<Y> get(String attributeName)
Note: Applications using the string-based API may need to specify the type resulting from the get
operation in order to avoid the use of Path
variables.
For example: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); q.select(p) .where(cb.isMember("joe", p.<Set<String>>get("nicknames"))); rather than: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); Path<Set<String>> nicknames = p.get("nicknames"); q.select(p) .where(cb.isMember("joe", nicknames));
- Parameters:
attributeName
- name of the attribute
- Return:
- path corresponding to the referenced attribute
- Throws:
- IllegalStateException - if invoked on a path that corresponds to a basic type
- IllegalArgumentException - if attribute of the given name does not otherwise exist
- Inherited from:
Path<X>
- Since:
- JPA 2.0
From<Z,X> getCorrelationParent()
- Return:
- the parent of the correlated From object
- Throws:
- IllegalStateException - if the From object has not been obtained through correlation
- Since:
- JPA 2.0
Returns empty set if no fetch joins have been made from this type. Modifications to the set do not affect the query.
- Return:
- fetch joins made from this type
- Inherited from:
FetchParent<Z,X>
- Since:
- JPA 2.0
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
- Return:
- bindable object corresponding to the path
- Inherited from:
Path<X>
- Since:
- JPA 2.0
Path<?> getParentPath()
- Return:
- parent
- Inherited from:
Path<X>
- Since:
- JPA 2.0
boolean isCorrelated()
- Return:
- boolean indicating whether the object has been obtained through correlation
- Since:
- JPA 2.0
- Parameters:
collection
- target of the join
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
collection
- target of the joinjt
- join type
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
list
- target of the join
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
list
- target of the joinjt
- join type
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
map
- target of the join
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
map
- target of the joinjt
- join type
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
set
- target of the join
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
set
- target of the joinjt
- join type
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
attribute
- target of the join
- Return:
- the resulting join
- Since:
- JPA 2.0
- Parameters:
attribute
- target of the joinjt
- join type
- Return:
- the resulting join
- Since:
- JPA 2.0
- 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
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Since:
- JPA 2.0
- 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
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Since:
- JPA 2.0
- 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
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Since:
- JPA 2.0
- 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
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Since:
- JPA 2.0
- 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
- Parameters:
attributeName
- name of the attribute for the target of the joinjt
- join type
- Return:
- the resulting join
- Throws:
- IllegalArgumentException - if attribute of the given name does not exist
- Since:
- JPA 2.0
- Return:
- expression corresponding to the type of the path
- Inherited from:
Path<X>
- Since:
- JPA 2.0