mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-13 06:34:50 +00:00
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 SimpleAttribute getVersionAttribute() {
|
||||
return versionAttribute;
|
||||
}
|
||||
|
||||
public SimpleAttribute getDiscriminatorAttribute() {
|
||||
return discriminatorAttribute;
|
||||
}
|
||||
|
||||
public Iterable<AssociationAttribute> getAssociationAttributes() {
|
||||
return associationAttributeMap.values();
|
||||
}
|
||||
@ -449,6 +458,9 @@ private void createMappedProperty(Member member, ResolvedTypeWithMembers resolve
|
||||
} 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 @@ private String determineExplicitEntityName() {
|
||||
return JandexHelper.getValue( jpaEntityAnnotation, "name", String.class );
|
||||
}
|
||||
|
||||
public InheritanceType getInheritanceType() {
|
||||
return inheritanceType;
|
||||
}
|
||||
|
||||
public IdType getIdType() {
|
||||
return idType;
|
||||
}
|
||||
|
@ -75,7 +75,11 @@ public SingularAttributeSource getVersioningAttributeSource() {
|
||||
|
||||
@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();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user