Spring Data Commons

org.springframework.data.repository.query.parser
Class Property

java.lang.Object
  extended by org.springframework.data.repository.query.parser.Property

public class Property
extends Object

Abstraction of a Property of a domain class.

Author:
Oliver Gierke

Method Summary
 boolean equals(Object obj)
           
static Property from(String source, Class<?> type)
          Extracts the Property chain from the given source String and type.
 String getName()
          Returns the name of the Property.
 Class<?> getType()
          Returns the type of the property will return the plain resolved type for simple properties, the component type for any Iterable or the value type of a Map if the property is one.
 int hashCode()
           
 boolean hasNext()
          Returns whether there is a nested Property.
 boolean isCollection()
          Returns whether the Property is actually a collection.
 Property next()
          Returns the next nested Property.
 String toDotPath()
          Returns the Property path in dot notation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of the Property.

Returns:
the name

getType

public Class<?> getType()
Returns the type of the property will return the plain resolved type for simple properties, the component type for any Iterable or the value type of a Map if the property is one.

Returns:

next

public Property next()
Returns the next nested Property.

Returns:
the next nested Property or null if no nested Property available.
See Also:
hasNext()

hasNext

public boolean hasNext()
Returns whether there is a nested Property. If this returns true you can expect next() to return a non- null value.

Returns:

toDotPath

public String toDotPath()
Returns the Property path in dot notation.

Returns:

isCollection

public boolean isCollection()
Returns whether the Property is actually a collection.

Returns:

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

from

public static Property from(String source,
                            Class<?> type)
Extracts the Property chain from the given source String and type.

Parameters:
source -
type -
Returns:

Spring Data Commons

Copyright © 2011. All Rights Reserved.