public abstract class AbstractPathImpl<X> extends ExpressionImpl<X> implements Path<X>, PathImplementor<X>, Serializable
Path
implementations.ParameterContainer.Helper
Constructor and Description |
---|
AbstractPathImpl(CriteriaBuilderImpl criteriaBuilder,
Class<X> javaType,
PathSource pathSource)
Constructs a basic path instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canBeDereferenced() |
<K,V,M extends Map<K,V>> |
get(MapAttribute<X,K,V> attribute) |
<E,C extends Collection<E>> |
get(PluralAttribute<X,C,E> attribute) |
<Y> Path<Y> |
get(SingularAttribute<? super X,Y> attribute) |
<Y> Path<Y> |
get(String attributeName) |
PathSource<?> |
getParentPath() |
String |
getPathIdentifier()
Get the string representation of this path as a navigation from one of the
queries identification variables
|
PathSource |
getPathSource() |
protected PathSource |
getPathSourceForSubPaths() |
protected RuntimeException |
illegalDereference() |
protected Attribute |
locateAttribute(String attributeName)
Get the attribute by name from the underlying model.
|
protected abstract Attribute |
locateAttributeInternal(String attributeName)
Get the attribute by name from the underlying model.
|
void |
prepareAlias(RenderingContext renderingContext) |
protected void |
registerAttributePath(String attributeName,
Path path) |
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
String |
render(RenderingContext renderingContext) |
String |
renderProjection(RenderingContext renderingContext) |
protected Path |
resolveCachedAttributePath(String attributeName) |
Expression<Class<? extends X>> |
type() |
protected RuntimeException |
unknownAttribute(String attributeName) |
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
criteriaBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, treatAs
asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString
getValueHandlers
getValueHandler
as, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, isCompoundSelection
getAlias, getJavaType
public AbstractPathImpl(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource pathSource)
criteriaBuilder
- The criteria builderjavaType
- The java type of this pathpathSource
- The source (or origin) from which this path originatespublic PathSource getPathSource()
public PathSource<?> getParentPath()
getParentPath
in interface Path<X>
public String getPathIdentifier()
PathSource
getPathIdentifier
in interface PathSource<X>
protected abstract boolean canBeDereferenced()
protected final RuntimeException illegalDereference()
protected final RuntimeException unknownAttribute(String attributeName)
public <Y> Path<Y> get(SingularAttribute<? super X,Y> attribute)
protected PathSource getPathSourceForSubPaths()
public <E,C extends Collection<E>> Expression<C> get(PluralAttribute<X,C,E> attribute)
public <K,V,M extends Map<K,V>> Expression<M> get(MapAttribute<X,K,V> attribute)
protected final Attribute locateAttribute(String attributeName)
attributeName
- The name of the attribute to locateIllegalArgumentException
- If no such attribute existsprotected abstract Attribute locateAttributeInternal(String attributeName)
locateAttribute(java.lang.String)
which also applies nullness checking for proper error reporting.attributeName
- The name of the attribute to locateIllegalArgumentException
- If no such attribute existspublic void registerParameters(ParameterRegistry registry)
ParameterContainer
registerParameters
in interface ParameterContainer
registry
- The parameter registry with which to register.public void prepareAlias(RenderingContext renderingContext)
prepareAlias
in interface PathSource<X>
public String render(RenderingContext renderingContext)
render
in interface Renderable
public String renderProjection(RenderingContext renderingContext)
renderProjection
in interface Renderable
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.