public interface PersistentProperty<P extends PersistentProperty<P>>
Type | Property and Description |
---|---|
boolean |
isId
Gets the value of the property idProperty.
|
boolean |
isVersion
Gets the value of the property versionProperty.
|
Modifier and Type | Method and Description |
---|---|
<A extends Annotation> |
findAnnotation(Class<A> annotationType)
Looks up the annotation of the given type on the
PersistentProperty . |
<A extends Annotation> |
findPropertyOrOwnerAnnotation(Class<A> annotationType)
Looks up the annotation of the given type on the property and the owning type if no annotation can be found on it.
|
Class<?> |
getActualType()
Returns the actual type of the property.
|
Association<P> |
getAssociation() |
Class<?> |
getComponentType()
Returns the component type of the type if it is a
Collection . |
Field |
getField() |
Method |
getGetter()
Returns the getter method to access the property value if available.
|
Class<?> |
getMapValueType()
Returns the type of the values if the property is a
Map . |
String |
getName()
The name of the property
|
PersistentEntity<?,P> |
getOwner()
Returns the
PersistentEntity owning the current PersistentProperty . |
Iterable<? extends TypeInformation<?>> |
getPersistentEntityType()
Returns the
TypeInformation if the property references a PersistentEntity . |
Class<?> |
getRawType()
Returns the raw type as it's pulled from from the reflected property.
|
Method |
getSetter()
Returns the setter method to set a property value.
|
String |
getSpelExpression() |
Class<?> |
getType()
The type of the property
|
TypeInformation<?> |
getTypeInformation()
Returns the
TypeInformation of the property. |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Returns whether the
PersistentProperty has an annotation of the given type. |
boolean |
isArray()
Returns whether the property is an array.
|
boolean |
isAssociation()
Returns whether the property is an
Association . |
boolean |
isCollectionLike()
Returns whether the property is a
Collection , Iterable or an array. |
boolean |
isEntity()
Returns whether the type of the
PersistentProperty is actually to be regarded as PersistentEntity
in turn. |
boolean |
isIdProperty()
Gets the value of the property idProperty.
|
boolean |
isMap()
Returns whether the property is a
Map . |
boolean |
isTransient()
Returns whether the property is transient.
|
boolean |
isVersionProperty()
Gets the value of the property versionProperty.
|
boolean |
isWritable()
Returns whether the current property is writable, i.e. if the value held for it shall be written to the data store.
|
boolean |
usePropertyAccess()
Returns whether property access shall be used for reading the property value.
|
boolean isIdProperty
boolean isVersionProperty
PersistentEntity<?,P> getOwner()
PersistentEntity
owning the current PersistentProperty
.String getName()
Class<?> getType()
TypeInformation<?> getTypeInformation()
TypeInformation
of the property.Iterable<? extends TypeInformation<?>> getPersistentEntityType()
TypeInformation
if the property references a PersistentEntity
. Will return
null in case it refers to a simple type. Will return Collection
's component type or the
Map
's value type transparently.Method getGetter()
Method getSetter()
Field getField()
String getSpelExpression()
Association<P> getAssociation()
boolean isEntity()
PersistentProperty
is actually to be regarded as PersistentEntity
in turn.boolean isIdProperty()
boolean isVersionProperty()
boolean isCollectionLike()
Collection
, Iterable
or an array.boolean isMap()
Map
.boolean isArray()
boolean isTransient()
boolean isWritable()
boolean isAssociation()
Association
.Class<?> getComponentType()
Collection
. Will return the type of the key if
the property is a Map
.Collection
nor
Map
.Class<?> getRawType()
Class<?> getMapValueType()
Map
.Map
Class<?> getActualType()
<A extends Annotation> A findAnnotation(Class<A> annotationType)
PersistentProperty
. Will inspect accessors and the
potentially backing field and traverse accessor methods to potentially available super types.annotationType
- the annotation to look up, must not be null.AnnotationUtils.findAnnotation(Method, Class)
<A extends Annotation> A findPropertyOrOwnerAnnotation(Class<A> annotationType)
annotationType
- must not be null.boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
PersistentProperty
has an annotation of the given type.annotationType
- the annotation to lookup, must not be null.PersistentProperty
has an annotation of the given type.boolean usePropertyAccess()
Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.