Path implementations.
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private final PathSource | |
| private final Expression |
| Access | Constructor and Description |
|---|---|
| public | AbstractPathImpl(CriteriaBuilderImpl
The criteria builder criteriaBuilder, Class<X> The java type of this path javaType, PathSource<X> The source (or origin) from which this path originates pathSource)Constructs a basic path instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract boolean | |
| public <Y> Path | get(SingularAttribute<? super X, Y>
single-valued attribute attribute)Implements javax. |
| public <E, C extends Collection | get(PluralAttribute<X, C, E>
collection-valued attribute attribute)Implements javax. |
| public <K, V, M extends Map | get(MapAttribute<X, K, V>
map-valued attribute attribute)Implements javax. |
| public <Y> Path | get(String
name of the attribute attributeName)Implements javax. |
| public PathSource | getParentPath()
Implements javax. |
| public String | getPathIdentifier()
Implements org. |
| public PathSource | |
| protected PathSource | |
| protected final RuntimeException | |
| protected final Attribute | Returns: The attribute; should never return null.The name of the attribute to locate attributeName)Get the attribute by name from the underlying model. |
| protected abstract Attribute | Returns: The attribute; may be null.The name of the attribute to locate attributeName)Get the attribute by name from the underlying model. |
| public void | prepareAlias(RenderingContext renderingContext)
Implements org. |
| protected final void | |
| public void | registerParameters(ParameterRegistry
The parameter registry with which to register. registry)Implements org. |
| public String | render(RenderingContext renderingContext)
Implements org. |
| protected final Path | |
| public Expression | type()
Implements javax. |
| protected final RuntimeException |
| attributePathRegistry | back to summary |
|---|---|
| private Map<String, Path<X>> attributePathRegistry | |
| pathSource | back to summary |
|---|---|
| private final PathSource<X> pathSource | |
| typeExpression | back to summary |
|---|---|
| private final Expression<Class<? extends X>> typeExpression | |
| AbstractPathImpl | back to summary |
|---|---|
| public AbstractPathImpl(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource<X> pathSource) Constructs a basic path instance.
| |
| canBeDereferenced | back to summary |
|---|---|
| protected abstract boolean canBeDereferenced() | |
| get | back to summary |
|---|---|
| public <Y> Path Implements javax. Doc from javax. Create a path corresponding to the referenced single-valued attribute.
| |
| get | back to summary |
|---|---|
| public <E, C extends Collection Implements javax. Doc from javax. Create a path corresponding to the referenced collection-valued attribute.
| |
| get | back to summary |
|---|---|
| public <K, V, M extends Map Implements javax. Doc from javax. Create a path corresponding to the referenced map-valued attribute.
| |
| get | back to summary |
|---|---|
| public <Y> Path Implements javax. Doc from javax. Create a path corresponding to the referenced attribute. Note Applications using the string-based API may need to
specify the type resulting from the
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));
| |
| getParentPath | back to summary |
|---|---|
| public PathSource Implements javax. Doc from javax. Return the parent "node" in the path or null if no parent.
| |
| getPathIdentifier | back to summary |
|---|---|
| public String getPathIdentifier() Implements org. Doc from org. Get the string representation of this path as a navigation from one of the queries identification variables | |
| getPathSource | back to summary |
|---|---|
| public PathSource | |
| getPathSourceForSubPaths | back to summary |
|---|---|
| protected PathSource | |
| illegalDereference | back to summary |
|---|---|
| protected final RuntimeException illegalDereference() | |
| locateAttribute | back to summary |
|---|---|
| protected final Attribute Get the attribute by name from the underlying model. This allows subclasses to define exactly how the attribute is derived.
| |
| locateAttributeInternal | back to summary |
|---|---|
| protected abstract Attribute Get the attribute by name from the underlying model. This allows subclasses to
define exactly how the attribute is derived. Called from
| |
| prepareAlias | back to summary |
|---|---|
| public void prepareAlias(RenderingContext renderingContext) Implements org.
| |
| registerAttributePath | back to summary |
|---|---|
| protected final void registerAttributePath(String attributeName, Path<X> path) | |
| registerParameters | back to summary |
|---|---|
| public void registerParameters(ParameterRegistry registry) Implements org. Doc from org. Register any parameters contained within this query component with the given registry.
| |
| render | back to summary |
|---|---|
| public String render(RenderingContext renderingContext) Implements org. Doc from org. Perform the rendering, returning the rendition
| |
| resolveCachedAttributePath | back to summary |
|---|---|
| protected final Path | |
| type | back to summary |
|---|---|
| public Expression Implements javax. Doc from javax. Create an expression corresponding to the type of the path.
| |
| unknownAttribute | back to summary |
|---|---|
| protected final RuntimeException unknownAttribute(String attributeName) | |