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()
Deprecated.
Use getPersistentEntityTypes instead.
|
default Iterable<? extends TypeInformation<?>> |
getPersistentEntityTypes()
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 <A extends Annotation> |
getRequiredAnnotation(Class<A> annotationType)
Looks up the annotation of the given type on the
PersistentProperty. |
default Association<P> |
getRequiredAssociation()
Get the
Association of this property. |
default Field |
getRequiredField() |
default Method |
getRequiredGetter() |
default Method |
getRequiredSetter() |
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.@Deprecated 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.default Iterable<? extends TypeInformation<?>> getPersistentEntityTypes()
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.@Nullable Method getGetter()
default Method getRequiredGetter()
@Nullable Method getSetter()
default Method getRequiredSetter()
@Nullable Field getField()
default Field getRequiredField()
@Nullable String getSpelExpression()
@Nullable Association<P> getAssociation()
Association.default Association<P> getRequiredAssociation()
Association of this property.IllegalStateException - if not involved in an Association.boolean isEntity()
PersistentProperty is actually to be regarded as PersistentEntity
in turn.PersistentEntity.boolean isIdProperty()
boolean isVersionProperty()
boolean isCollectionLike()
Collection, Iterable or an array.boolean isMap()
Map.boolean isArray()
boolean isTransient()
boolean isWritable()
boolean isAssociation()
Association.@Nullable Class<?> getComponentType()
Collection. Will return the type of the key if
the property is a Map.Collection nor
Map.Class<?> getRawType()
@Nullable Class<?> getMapValueType()
Map.MapClass<?> getActualType()
@Nullable <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)default <A extends Annotation> A getRequiredAnnotation(Class<A> annotationType) throws IllegalStateException
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.IllegalStateException - if the required annotationType is not found.@Nullable <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–2017 Pivotal Software, Inc.. All rights reserved.