From 9931e885c0a336e367c313d5d3466b945eb7211a Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 31 Mar 2011 18:24:03 +0200 Subject: [PATCH] Expose type of a query parser Property. --- .../data/repository/query/parser/Property.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/parser/Property.java b/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/parser/Property.java index afe1fafae..c845bc54e 100644 --- a/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/parser/Property.java +++ b/spring-data-commons-core/src/main/java/org/springframework/data/repository/query/parser/Property.java @@ -115,6 +115,18 @@ public class Property { return name; } + /** + * Returns the type of the property will return the plain resolved type for + * simple properties, the component type for any {@link Iterable} or the + * value type of a {@link java.util.Map} if the property is one. + * + * @return + */ + public Class getType() { + + return this.type.getType(); + } + /** * Returns the next nested {@link Property}.