From e2ff8ed5429b21cd79d595662d88e167d0d9bab1 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Tue, 21 Jun 2011 16:06:52 -0700 Subject: [PATCH] HHH-6341 : Add AttributeBinding.isBasicPropertyAccessor() --- .../metamodel/binding/AbstractAttributeBinding.java | 6 ++++++ .../org/hibernate/metamodel/binding/AttributeBinding.java | 2 ++ 2 files changed, 8 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AbstractAttributeBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AbstractAttributeBinding.java index e85de253a5..62b8cfb742 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AbstractAttributeBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AbstractAttributeBinding.java @@ -179,6 +179,12 @@ public abstract class AbstractAttributeBinding implements AttributeBinding { return propertyAccessorName; } + @Override + public boolean isBasicPropertyAccessor() { + return propertyAccessorName==null || "property".equals( propertyAccessorName ); + } + + @Override public boolean hasFormula() { for ( SimpleValue simpleValue : getValues() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AttributeBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AttributeBinding.java index 8eb2534dd7..e7affb3d98 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AttributeBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/binding/AttributeBinding.java @@ -80,6 +80,8 @@ public interface AttributeBinding { public String getPropertyAccessorName(); + public boolean isBasicPropertyAccessor(); + public boolean hasFormula(); public boolean isAlternateUniqueKey();