org.hibernate.query.sqm.tree.expression.AbstractSqmParameter 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 http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.query.sqm.tree.expression;
import org.hibernate.metamodel.model.domain.AllowableParameterType;
import org.hibernate.query.sqm.NodeBuilder;
/**
* Common support for SqmParameter impls
*
* @author Steve Ebersole
*/
public abstract class AbstractSqmParameter extends AbstractSqmExpression implements SqmParameter {
private final boolean canBeMultiValued;
public AbstractSqmParameter(
boolean canBeMultiValued,
AllowableParameterType inherentType,
NodeBuilder nodeBuilder) {
super( inherentType, nodeBuilder );
this.canBeMultiValued = canBeMultiValued;
}
@Override
public String getName() {
return null;
}
@Override
public Integer getPosition() {
return null;
}
@Override
public boolean allowMultiValuedBinding() {
return canBeMultiValued;
}
@Override
public AllowableParameterType getNodeType() {
return (AllowableParameterType) super.getNodeType();
}
@Override
public AllowableParameterType getAnticipatedType() {
return this.getNodeType();
}
@Override
public Class getParameterType() {
return this.getNodeType().getExpressableJavaTypeDescriptor().getJavaType();
}
}