HHH-6447 Formatting
This commit is contained in:
parent
520db31a65
commit
c069e6dada
|
@ -112,10 +112,15 @@ public class ConfiguredClass {
|
|||
private final Map<String, SimpleAttribute> simpleAttributeMap;
|
||||
|
||||
/**
|
||||
* The mapped simple attributes for this entity
|
||||
* The version attribute or {@code null} in case none exists.
|
||||
*/
|
||||
private SimpleAttribute versionAttribute;
|
||||
|
||||
/**
|
||||
* The discriminator attribute or {@code null} in case none exists.
|
||||
*/
|
||||
private SimpleAttribute discriminatorAttribute;
|
||||
|
||||
/**
|
||||
* The embedded classes for this entity
|
||||
*/
|
||||
|
@ -187,6 +192,10 @@ public class ConfiguredClass {
|
|||
return versionAttribute;
|
||||
}
|
||||
|
||||
public SimpleAttribute getDiscriminatorAttribute() {
|
||||
return discriminatorAttribute;
|
||||
}
|
||||
|
||||
public Iterable<AssociationAttribute> getAssociationAttributes() {
|
||||
return associationAttributeMap.values();
|
||||
}
|
||||
|
@ -449,6 +458,9 @@ public class ConfiguredClass {
|
|||
} else if (attribute.isVersioned()) {
|
||||
// todo - error handling in case there are multiple version attributes
|
||||
versionAttribute = attribute;
|
||||
} else if (attribute.isDiscriminator()) {
|
||||
// todo - error handling in case there are multiple discriminator attributes
|
||||
versionAttribute = attribute;
|
||||
}
|
||||
else {
|
||||
simpleAttributeMap.put( attributeName, attribute );
|
||||
|
|
|
@ -117,10 +117,6 @@ public class EntityClass extends ConfiguredClass {
|
|||
return JandexHelper.getValue( jpaEntityAnnotation, "name", String.class );
|
||||
}
|
||||
|
||||
public InheritanceType getInheritanceType() {
|
||||
return inheritanceType;
|
||||
}
|
||||
|
||||
public IdType getIdType() {
|
||||
return idType;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,11 @@ public class RootEntitySourceImpl extends EntitySourceImpl implements RootEntity
|
|||
|
||||
@Override
|
||||
public SingularAttributeSource getDiscriminatorAttributeSource() {
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
SingularAttributeSource attributeSource = null;
|
||||
if ( getEntityClass().getDiscriminatorAttribute() != null ) {
|
||||
attributeSource = new SingularAttributeSourceImpl( getEntityClass().getVersionAttribute() );
|
||||
}
|
||||
return attributeSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -183,7 +183,4 @@ public interface EntitySource extends SubclassEntityContainer, AttributeSourceCo
|
|||
* @return The meta-attribute sources.
|
||||
*/
|
||||
public Iterable<MetaAttributeSource> metaAttributes();
|
||||
|
||||
// public List<XMLFetchProfileElement> getFetchProfile();
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class InheritanceBindingTest extends BaseAnnotationBindingTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
//@Resources(annotatedClasses = { RootOfSingleTableInheritance.class, SubclassOfSingleTableInheritance.class })
|
||||
// @Resources(annotatedClasses = { RootOfSingleTableInheritance.class, SubclassOfSingleTableInheritance.class })
|
||||
@FailureExpected(jiraKey = "HHH-6447", message = "Work in progress")
|
||||
public void testDiscriminatorValue() {
|
||||
EntityBinding entityBinding = getEntityBinding( SubclassOfSingleTableInheritance.class );
|
||||
|
|
Loading…
Reference in New Issue