Spring Data Core

org.springframework.data.mapping
Class PreferredConstructor.Parameter<T,P extends PersistentProperty<P>>

java.lang.Object
  extended by org.springframework.data.mapping.PreferredConstructor.Parameter<T,P>
Type Parameters:
T - the type of the parameter
Enclosing class:
PreferredConstructor<T,P extends PersistentProperty<P>>

public static class PreferredConstructor.Parameter<T,P extends PersistentProperty<P>>
extends Object

Value object to represent constructor parameters.

Author:
Oliver Gierke

Constructor Summary
PreferredConstructor.Parameter(String name, TypeInformation<T> type, Annotation[] annotations, PersistentEntity<T,P> entity)
          Creates a new PreferredConstructor.Parameter with the given name, TypeInformation as well as an array of Annotations.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Returns the name of the parameter or null if none was given.
 Class<T> getRawType()
          Returns the raw resolved type of the parameter.
 String getSpelExpression()
          Returns the key to be used when looking up a source data structure to populate the actual parameter value.
 TypeInformation<T> getType()
          Returns the TypeInformation of the parameter.
 int hashCode()
           
 boolean hasSpelExpression()
          Returns whether the constructor parameter is equipped with a SpEL expression.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferredConstructor.Parameter

public PreferredConstructor.Parameter(String name,
                                      TypeInformation<T> type,
                                      Annotation[] annotations,
                                      PersistentEntity<T,P> entity)
Creates a new PreferredConstructor.Parameter with the given name, TypeInformation as well as an array of Annotations. Will insprect the annotations for an Value annotation to lookup a key or an SpEL expression to be evaluated.

Parameters:
name - the name of the parameter, can be null
type - must not be null
annotations - must not be null but can be empty
entity - can be null.
Method Detail

getName

public String getName()
Returns the name of the parameter or null if none was given.

Returns:

getType

public TypeInformation<T> getType()
Returns the TypeInformation of the parameter.

Returns:

getRawType

public Class<T> getRawType()
Returns the raw resolved type of the parameter.

Returns:

getSpelExpression

public String getSpelExpression()
Returns the key to be used when looking up a source data structure to populate the actual parameter value.

Returns:

hasSpelExpression

public boolean hasSpelExpression()
Returns whether the constructor parameter is equipped with a SpEL expression.

Returns:

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.