Added isEntity() method to PersistentProperty.

This commit is contained in:
Oliver Gierke
2011-03-17 09:21:32 +01:00
parent 7a2f25190a
commit a07a2cc760
2 changed files with 13 additions and 0 deletions

View File

@@ -153,6 +153,11 @@ public class BasicPersistentProperty implements PersistentProperty {
return !MappingBeanHelper.isSimpleType(getType());
}
}
@Override
public boolean isEntity() {
return isComplexType() && !isTransient() && !isCollection() && !isMap();
}
@Override
public Class<?> getComponentType() {

View File

@@ -54,6 +54,14 @@ public interface PersistentProperty {
boolean isComplexType();
/**
* Returns whether the property has to be regarded as entity which means its type will be also be considered to be a
* {@link PersistentEntity}.
*
* @return
*/
boolean isEntity();
Class<?> getComponentType();
boolean isIdProperty();