org.hibernate.ejb.criteria.path
Class SingularAttributePath<X>

java.lang.Object
  extended by org.hibernate.ejb.criteria.AbstractNode
      extended by org.hibernate.ejb.criteria.expression.AbstractTupleElement<X>
          extended by org.hibernate.ejb.criteria.expression.SelectionImpl<T>
              extended by org.hibernate.ejb.criteria.expression.ExpressionImpl<X>
                  extended by org.hibernate.ejb.criteria.path.AbstractPathImpl<X>
                      extended by org.hibernate.ejb.criteria.path.SingularAttributePath<X>
All Implemented Interfaces:
Serializable, javax.persistence.criteria.Expression<X>, javax.persistence.criteria.Path<X>, javax.persistence.criteria.Selection<X>, TupleElement<X>, ExpressionImplementor<X>, ParameterContainer, PathImplementor<X>, PathSource<X>, Renderable, SelectionImplementor<X>, TupleElementImplementor<X>

public class SingularAttributePath<X>
extends AbstractPathImpl<X>
implements Serializable

Models a path for a SingularAttribute generally obtained from a Path.get(SingularAttribute) call

Author:
Steve Ebersole
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.ejb.criteria.ParameterContainer
ParameterContainer.Helper
 
Constructor Summary
SingularAttributePath(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource pathSource, javax.persistence.metamodel.SingularAttribute<?,X> attribute)
           
 
Method Summary
protected  boolean canBeDereferenced()
          
 javax.persistence.metamodel.SingularAttribute<?,X> getAttribute()
          Retrieve reference to the attribute this path represents.
 javax.persistence.metamodel.Bindable<X> getModel()
          
protected  javax.persistence.metamodel.Attribute locateAttributeInternal(String attributeName)
          Get the attribute by name from the underlying model.
 
Methods inherited from class org.hibernate.ejb.criteria.path.AbstractPathImpl
get, get, get, get, getParentPath, getPathIdentifier, getPathSource, illegalDereference, locateAttribute, prepareAlias, registerAttributePath, registerParameters, render, renderProjection, resolveCachedAttributePath, type, unknownAttribute
 
Methods inherited from class org.hibernate.ejb.criteria.expression.ExpressionImpl
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
 
Methods inherited from class org.hibernate.ejb.criteria.expression.SelectionImpl
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
 
Methods inherited from class org.hibernate.ejb.criteria.expression.AbstractTupleElement
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
 
Methods inherited from class org.hibernate.ejb.criteria.AbstractNode
criteriaBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.ejb.criteria.ExpressionImplementor
asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString
 
Methods inherited from interface org.hibernate.ejb.criteria.SelectionImplementor
getValueHandlers
 
Methods inherited from interface org.hibernate.ejb.criteria.TupleElementImplementor
getValueHandler
 
Methods inherited from interface javax.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNull
 
Methods inherited from interface javax.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
 
Methods inherited from interface javax.persistence.TupleElement
getAlias, getJavaType
 

Constructor Detail

SingularAttributePath

public SingularAttributePath(CriteriaBuilderImpl criteriaBuilder,
                             Class<X> javaType,
                             PathSource pathSource,
                             javax.persistence.metamodel.SingularAttribute<?,X> attribute)
Method Detail

getAttribute

public javax.persistence.metamodel.SingularAttribute<?,X> getAttribute()
Retrieve reference to the attribute this path represents.

Specified by:
getAttribute in interface PathImplementor<X>
Returns:
The metamodel attribute.

getModel

public javax.persistence.metamodel.Bindable<X> getModel()

Specified by:
getModel in interface javax.persistence.criteria.Path<X>

canBeDereferenced

protected boolean canBeDereferenced()

Specified by:
canBeDereferenced in class AbstractPathImpl<X>

locateAttributeInternal

protected javax.persistence.metamodel.Attribute locateAttributeInternal(String attributeName)
Description copied from class: AbstractPathImpl
Get the attribute by name from the underlying model. This allows subclasses to define exactly how the attribute is derived. Called from AbstractPathImpl.locateAttribute(java.lang.String) which also applies nullness checking for proper error reporting.

Specified by:
locateAttributeInternal in class AbstractPathImpl<X>
Parameters:
attributeName - The name of the attribute to locate
Returns:
The attribute; may be null.


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.