diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java index 89fc350133..f372291d07 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java @@ -216,6 +216,32 @@ public class EntityBinding { return attributeBindingMap.get( name ); } + /** + * Gets the number of attribute bindings defined on this class, including the + * identifier attribute binding and attribute bindings defined + * as part of a join. + * + * @return The number of attribute bindings + */ + public int getAttributeBindingClosureSpan() { + // TODO: fix this after HHH-6337 is fixed. + // if this is not a root, then need to include the superclass attribute bindings + return attributeBindingMap.size(); + } + + /** + * Gets the attribute bindings defined on this class, including the + * identifier attribute binding and attribute bindings defined + * as part of a join. + * + * @return The attribute bindings. + */ + public Iterable getAttributeBindingClosure() { + // TODO: fix this after HHH-6337 is fixed. + // if this is not a root, then need to include the superclass attribute bindings + return getAttributeBindings(); + } + public Iterable getEntityReferencingAttributeBindings() { return entityReferencingAttributeBindings; }