Code example for MarkerObject

0
class ColumnBasedDiscriminator implements EntityDiscriminator { 
 
	private static final Log log = LoggerFactory.make();
 
	private static final Object NULL_DISCRIMINATOR = new MarkerObject( "<null discriminator>" );
	private static final Object NOT_NULL_DISCRIMINATOR = new MarkerObject( "<not null discriminator>" );
 
	private final String alias;
	private final String columnName;
	private final Type discriminatorType;
	private final boolean forced;
	private final boolean needed;
	private final String sqlValue;
	private final Object value; 
	private final Map<Object, String> subclassesByValue;
 
	public ColumnBasedDiscriminator(final PersistentClass persistentClass, final SessionFactoryImplementor factory, final Column column) {
		forced = persistentClass.isForceDiscriminator();
		columnName = column.getQuotedName( factory.getDialect() );
		alias = column.getAlias( factory.getDialect(), persistentClass.getRootTable() );