org.hibernate.query.criteria.internal.expression.SelectionImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* 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 .
*/
package org.hibernate.query.criteria.internal.expression;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import javax.persistence.criteria.Selection;
import org.hibernate.query.criteria.internal.CriteriaBuilderImpl;
import org.hibernate.query.criteria.internal.ParameterContainer;
import org.hibernate.query.criteria.internal.SelectionImplementor;
import org.hibernate.query.criteria.internal.ValueHandlerFactory;
/**
* The Hibernate implementation of the JPA {@link Selection}
* contract.
*
* @author Steve Ebersole
*/
public abstract class SelectionImpl
extends AbstractTupleElement
implements SelectionImplementor, ParameterContainer, Serializable {
public SelectionImpl(CriteriaBuilderImpl criteriaBuilder, Class javaType) {
super( criteriaBuilder, javaType );
}
public Selection alias(String alias) {
setAlias( alias );
return this;
}
public boolean isCompoundSelection() {
return false;
}
public List getValueHandlers() {
return getValueHandler() == null
? null
: Collections.singletonList( (ValueHandlerFactory.ValueHandler) getValueHandler() );
}
public List> getCompoundSelectionItems() {
throw new IllegalStateException( "Not a compound selection" );
}
}