public abstract class AnnotationBasedPersistentProperty<P extends PersistentProperty<P>> extends AbstractPersistentProperty<P>
PersistentProperty that takes annotations at a property into account.| Type | Property and Description |
|---|---|
boolean |
isId
Returns whether the property is a potential identifier property of the owning
PersistentEntity. |
boolean |
isVersion
Returns whether the current property is a potential version property of the owning
PersistentEntity. |
association, field, information, name, owner, propertyDescriptor, rawType| Constructor and Description |
|---|
AnnotationBasedPersistentProperty(Field field,
PropertyDescriptor propertyDescriptor,
PersistentEntity<?,P> owner,
SimpleTypeHolder simpleTypeHolder)
Creates a new
AnnotationBasedPersistentProperty. |
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
findAnnotation(Class<A> annotationType)
Returns the annotation found for the current
AnnotationBasedPersistentProperty. |
<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.
|
String |
getSpelExpression()
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Returns whether the property carries the an annotation of the given type.
|
boolean |
isAssociation()
Considers the property an
Association if it is annotated with Reference. |
boolean |
isIdProperty()
Returns whether the property is a potential identifier property of the owning
PersistentEntity. |
boolean |
isTransient()
|
boolean |
isVersionProperty()
Returns whether the current property is a potential version property of the owning
PersistentEntity. |
boolean |
isWritable()
Returns whether the current property is writable, i.e. if the value held for it shall be written to the data store.
|
String |
toString() |
boolean |
usePropertyAccess()
Returns whether property access shall be used for reading the property value.
|
createAssociation, equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityType, getRawType, getSetter, getType, getTypeInformation, hashCode, isArray, isCollectionLike, isEntity, isMappublic AnnotationBasedPersistentProperty(Field field, PropertyDescriptor propertyDescriptor, PersistentEntity<?,P> owner, SimpleTypeHolder simpleTypeHolder)
AnnotationBasedPersistentProperty.field - must not be null.propertyDescriptor - can be null.owner - must not be null.public String getSpelExpression()
Value annotation at the property and returns the String value of
it.getSpelExpression in interface PersistentProperty<P extends PersistentProperty<P>>getSpelExpression in class AbstractPersistentProperty<P extends PersistentProperty<P>>AbstractPersistentProperty.getSpelExpression()public boolean isTransient()
isTransient in interface PersistentProperty<P extends PersistentProperty<P>>isTransient in class AbstractPersistentProperty<P extends PersistentProperty<P>>BasicPersistentPropertypublic boolean isIdProperty()
PersistentPropertyPersistentEntity.
This method is mainly used by PersistentEntity implementation to discover id property candidates on
PersistentEntity creation you should rather call PersistentEntity.isIdProperty(PersistentProperty)
to determine whether the current property is the id property of that PersistentEntity under consideration.public boolean isVersionProperty()
PersistentPropertyPersistentEntity. This method is mainly used by PersistentEntity implementation to discover version
property candidates on PersistentEntity creation you should rather call
PersistentEntity.isVersionProperty(PersistentProperty) to determine whether the current property is the
version property of that PersistentEntity under consideration.public boolean isAssociation()
Association if it is annotated with Reference.isAssociation in interface PersistentProperty<P extends PersistentProperty<P>>isAssociation in class AbstractPersistentProperty<P extends PersistentProperty<P>>public boolean isWritable()
PersistentPropertyisWritable in interface PersistentProperty<P extends PersistentProperty<P>>isWritable in class AbstractPersistentProperty<P extends PersistentProperty<P>>public <A extends Annotation> A findAnnotation(Class<A> annotationType)
AnnotationBasedPersistentProperty. Will prefer field
annotations over ones found at getters or setters.annotationType - must not be null.AnnotationUtils.findAnnotation(Method, Class)public <A extends Annotation> A findPropertyOrOwnerAnnotation(Class<A> annotationType)
PersistentPropertyannotationType - must not be null.public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
annotationType - the annotation type to look up.public boolean usePropertyAccess()
PersistentPropertyusePropertyAccess in interface PersistentProperty<P extends PersistentProperty<P>>usePropertyAccess in class AbstractPersistentProperty<P extends PersistentProperty<P>>public String toString()
toString in class AbstractPersistentProperty<P extends PersistentProperty<P>>Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.