/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.query.criteria.internal;
import javax.persistence.criteria.Path;
import javax.persistence.metamodel.Attribute;
/**
* Implementation contract for the JPA {@link Path} interface.
*
* @author Steve Ebersole
*/
public interface PathImplementor<X> extends ExpressionImplementor<X>, Path<X>, PathSource<X>, Renderable {
/**
* Retrieve reference to the attribute this path represents.
*
* @return The metamodel attribute.
*/
public Attribute<?, ?> getAttribute();
/**
* Defines handling for the JPA 2.1 TREAT down-casting feature.
*
* @param treatAsType The type to treat the path as.
* @param <T> The parameterized type representation of treatAsType.
*
* @return The properly typed view of this path.
*/
public <T extends X> PathImplementor<T> treatAs(Class<T> treatAsType);
}