org.hibernate.metamodel.source.binder
Interface DiscriminatorSource

All Known Implementing Classes:
DiscriminatorSourceImpl

public interface DiscriminatorSource

Contract for sources of information about a mapped discriminator.


Method Summary
 RelationalValueSource getDiscriminatorRelationalValueSource()
          Obtain the column/formula information about the discriminator.
 String getExplicitHibernateTypeName()
          Obtain the discriminator type.
 boolean isForced()
          "Forces" Hibernate to specify the allowed discriminator values, even when retrieving all instances of the root class.
 boolean isInserted()
          Set this to false, if your discriminator column is also part of a mapped composite identifier.
 

Method Detail

getDiscriminatorRelationalValueSource

RelationalValueSource getDiscriminatorRelationalValueSource()
Obtain the column/formula information about the discriminator.

Returns:
The column/formula information

getExplicitHibernateTypeName

String getExplicitHibernateTypeName()
Obtain the discriminator type. Unlike the type of attributes, implementors here should generally specify the type in case of no user selection rather than return null because we cannot infer it from any physical java member.

Returns:
The discriminator type

isForced

boolean isForced()
"Forces" Hibernate to specify the allowed discriminator values, even when retrieving all instances of the root class.

Returns:
true in case the discriminator value should be forces, false otherwise. Default is false.

isInserted

boolean isInserted()
Set this to false, if your discriminator column is also part of a mapped composite identifier. It tells Hibernate not to include the column in SQL INSERTs.

Returns:
true in case the discriminator value should be included in inserts, false otherwise. Default is true.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.