org.hibernate.persister.entity.DiscriminatorMetadata 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.persister.entity;
import org.hibernate.type.Type;
/**
* Provides the information needed to properly handle type discrimination
* in HQL queries, either by 'something.class' or 'type(something)' references.
*
* @author Steve Ebersole
*/
public interface DiscriminatorMetadata {
/**
* Get the sql fragment that is used to determine the actual discriminator value for a row.
*
* @param sqlQualificationAlias The qualification alias to append to any columns references in
* the generated fragment.
*
* @return The fragment
*/
public String getSqlFragment(String sqlQualificationAlias);
/**
* Get the type used to resolve the actual discriminator value resulting from
* {@link #getSqlFragment} back into a {@link Class} reference.
*
* @return The resolution type.
*/
public Type getResolutionType();
}