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 . |
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 . |
String |
toString() |
createAssociation, equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityType, getRawType, getSetter, getType, getTypeInformation, hashCode, isArray, isCollectionLike, isEntity, isMap, shallBePersisted
public 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>>
BasicPersistentProperty
public boolean isIdProperty()
PersistentProperty
PersistentEntity
.
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()
PersistentProperty
PersistentEntity
. 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 <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 boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to look up.public String toString()
toString
in class AbstractPersistentProperty<P extends PersistentProperty<P>>
Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.