Search in sources :

Example 1 with TypeDiscriminatorMetadata

use of org.hibernate.hql.internal.ast.TypeDiscriminatorMetadata in project hibernate-orm by hibernate.

the class MethodNode method typeDiscriminator.

private void typeDiscriminator(AST path) throws SemanticException {
    if (path == null) {
        throw new SemanticException("type() discriminator reference has no path!");
    }
    FromReferenceNode pathAsFromReferenceNode = (FromReferenceNode) path;
    FromElement fromElement = pathAsFromReferenceNode.getFromElement();
    TypeDiscriminatorMetadata typeDiscriminatorMetadata = fromElement.getTypeDiscriminatorMetadata();
    setDataType(typeDiscriminatorMetadata.getResolutionType());
    setText(typeDiscriminatorMetadata.getSqlFragment());
    setType(SqlTokenTypes.SQL_TOKEN);
}
Also used : TypeDiscriminatorMetadata(org.hibernate.hql.internal.ast.TypeDiscriminatorMetadata) SemanticException(antlr.SemanticException)

Aggregations

SemanticException (antlr.SemanticException)1 TypeDiscriminatorMetadata (org.hibernate.hql.internal.ast.TypeDiscriminatorMetadata)1