HHH-6232 : Minor correction adding discriminator value to DiscriminatorBindingState

This commit is contained in:
Gail Badner 2011-05-27 11:55:55 -07:00 committed by Hardy Ferentschik
parent 5df5883e31
commit 151d9ce316
1 changed files with 1 additions and 6 deletions

View File

@ -37,7 +37,6 @@ import org.hibernate.metamodel.source.hbm.xml.mapping.XMLHibernateMapping.XMLCla
*/
public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingState
implements DiscriminatorBindingState {
private final XMLDiscriminator discriminator;
private final String discriminatorValue;
private final boolean isForced;
private final boolean isInserted;
@ -53,10 +52,10 @@ public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingSta
super(
ownerClassName, defaults.getDefaultDiscriminatorColumnName(), defaults, null, null, null, true
);
XMLDiscriminator discriminator = xmlEntityClazz.getDiscriminator();
this.discriminatorValue = MappingHelper.getStringValue(
xmlEntityClazz.getDiscriminatorValue(), entityName
);
this.discriminator = xmlEntityClazz.getDiscriminator();
this.isForced = xmlEntityClazz.getDiscriminator().isForce();
this.isInserted = discriminator.isInsert();
this.typeName = discriminator.getType() == null ? "string" : discriminator.getType();
@ -79,10 +78,6 @@ public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingSta
return false;
}
public boolean isInsertable() {
return discriminator.isInsert();
}
@Override
public boolean isInserted() {
return isInserted;