EclipseLink 2.4.0, build 'v20120308-r10963' API Reference

javax.persistence.criteria
Interface Fetch<Z,X>

Type Parameters:
Z - the source type of the fetch
X - the target type of the fetch
All Superinterfaces:
FetchParent<Z,X>

public interface Fetch<Z,X>
extends FetchParent<Z,X>

Represents a join-fetched association or attribute.

Since:
Java Persistence 2.0

Method Summary
 Attribute<? super Z,?> getAttribute()
          Return the metamodel attribute corresponding to the fetch join.
 JoinType getJoinType()
          Return the join type used in the fetch join.
 Predicate getOn()
          Return the predicate that corresponds to the ON restriction(s), or null if no ON condition has been specified.
 FetchParent<?,Z> getParent()
          Return the parent of the fetched item.
 Fetch<Z,X> on(Expression<java.lang.Boolean> restriction)
          Modify the fetch join to restrict the result according to the specified ON condition and return the fetch join object.
 Fetch<Z,X> on(Predicate... restrictions)
          Modify the fetch join to restrict the result according to the specified ON condition and return the fetch join object.
 
Methods inherited from interface javax.persistence.criteria.FetchParent
fetch, fetch, fetch, fetch, fetch, fetch, getFetches
 

Method Detail

on

Fetch<Z,X> on(Expression<java.lang.Boolean> restriction)
Modify the fetch join to restrict the result according to the specified ON condition and return the fetch join object. Replaces the previous ON condition, if any.

Parameters:
restriction - a simple or compound boolean expression
Returns:
the modified fetch join object
Since:
Java Persistence 2.1

on

Fetch<Z,X> on(Predicate... restrictions)
Modify the fetch join to restrict the result according to the specified ON condition and return the fetch join object. Replaces the previous ON condition, if any.

Parameters:
restrictions - zero or more restriction predicates
Returns:
the modified fetch join object
Since:
Java Persistence 2.1

getOn

Predicate getOn()
Return the predicate that corresponds to the ON restriction(s), or null if no ON condition has been specified.

Returns:
the ON restriction predicate
Since:
Java Persistence 2.1

getAttribute

Attribute<? super Z,?> getAttribute()
Return the metamodel attribute corresponding to the fetch join.

Returns:
metamodel attribute for the join

getParent

FetchParent<?,Z> getParent()
Return the parent of the fetched item.

Returns:
fetch parent

getJoinType

JoinType getJoinType()
Return the join type used in the fetch join.

Returns:
join type

EclipseLink 2.4.0, build 'v20120308-r10963' API Reference