HHH-6263 Minor coding changes and removing unclear comment
This commit is contained in:
parent
151d9ce316
commit
debd342e48
|
@ -42,6 +42,7 @@ import org.hibernate.metamodel.binding.EntityBinding;
|
|||
import org.hibernate.metamodel.binding.EntityDiscriminator;
|
||||
import org.hibernate.metamodel.binding.ManyToOneAttributeBinding;
|
||||
import org.hibernate.metamodel.binding.SimpleAttributeBinding;
|
||||
import org.hibernate.metamodel.binding.state.DiscriminatorBindingState;
|
||||
import org.hibernate.metamodel.binding.state.ManyToOneAttributeBindingState;
|
||||
import org.hibernate.metamodel.binding.state.SimpleAttributeBindingState;
|
||||
import org.hibernate.metamodel.domain.Entity;
|
||||
|
@ -391,16 +392,19 @@ public class EntityBinder {
|
|||
|
||||
if ( simpleAttribute.isDiscriminator() ) {
|
||||
EntityDiscriminator entityDiscriminator = entityBinding.makeEntityDiscriminator( attributeName );
|
||||
entityDiscriminator.initialize( new DiscriminatorBindingStateImpl( simpleAttribute ) );
|
||||
DiscriminatorBindingState bindingState = new DiscriminatorBindingStateImpl( simpleAttribute );
|
||||
entityDiscriminator.initialize( bindingState );
|
||||
attributeBinding = entityDiscriminator.getValueBinding();
|
||||
}
|
||||
else if ( simpleAttribute.isVersioned() ) {
|
||||
attributeBinding = entityBinding.makeVersionBinding( attributeName );
|
||||
attributeBinding.initialize( new AttributeBindingStateImpl( simpleAttribute ) );
|
||||
SimpleAttributeBindingState bindingState = new AttributeBindingStateImpl( simpleAttribute );
|
||||
attributeBinding.initialize( bindingState );
|
||||
}
|
||||
else {
|
||||
attributeBinding = entityBinding.makeSimpleAttributeBinding( attributeName );
|
||||
attributeBinding.initialize( new AttributeBindingStateImpl( simpleAttribute ) );
|
||||
SimpleAttributeBindingState bindingState = new AttributeBindingStateImpl( simpleAttribute );
|
||||
attributeBinding.initialize( bindingState );
|
||||
}
|
||||
|
||||
if ( configuredClass.hasOwnTable() ) {
|
||||
|
|
|
@ -23,16 +23,15 @@
|
|||
*/
|
||||
package org.hibernate.metamodel.source.annotations.entity.state.binding;
|
||||
|
||||
import org.hibernate.metamodel.binding.state.DiscriminatorBindingState;
|
||||
import org.hibernate.metamodel.source.annotations.entity.DiscriminatorColumnValues;
|
||||
import org.hibernate.metamodel.source.annotations.entity.SimpleAttribute;
|
||||
|
||||
/**
|
||||
* @author Gail Badner
|
||||
*
|
||||
* TODO: extract a superclass that sets defaults for other stuff
|
||||
*/
|
||||
public class DiscriminatorBindingStateImpl
|
||||
extends AttributeBindingStateImpl implements org.hibernate.metamodel.binding.state.DiscriminatorBindingState {
|
||||
extends AttributeBindingStateImpl implements DiscriminatorBindingState {
|
||||
private final String discriminatorValue;
|
||||
private final boolean isForced;
|
||||
private final boolean isInserted;
|
||||
|
|
Loading…
Reference in New Issue