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.
|
Optional<Association<P>> |
getAssociation() |
Optional<Class<?>> |
getComponentType()
Returns the component type of the type if it is a
Collection . |
Optional<Field> |
getField() |
Optional<Method> |
getGetter()
Returns the getter method to access the property value if available.
|
Optional<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.
|
default Association<P> |
getRequiredAssociation() |
Optional<Method> |
getSetter()
Returns the setter method to set a property value.
|
Optional<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.Optional<Method> getGetter()
Optional<Method> getSetter()
Optional<Association<P>> getAssociation()
default Association<P> getRequiredAssociation()
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
.Optional<Class<?>> getComponentType()
Collection
. Will return the type of the key if
the property is a Map
.Optional.empty()
if neither Collection
nor Map
.Class<?> getRawType()
Optional<Class<?>> getMapValueType()
Map
.Optional.empty()
if no Map
Class<?> getActualType()
<A extends Annotation> Optional<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> Optional<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-2016–2017 Pivotal Software, Inc.. All rights reserved.