|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.mapping.model.AbstractPersistentProperty<P> org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<P>
public abstract class AnnotationBasedPersistentProperty<P extends PersistentProperty<P>>
Special PersistentProperty
that takes annotations at a property into account.
Field Summary |
---|
Fields inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty |
---|
association, field, information, name, owner, propertyDescriptor, rawType |
Constructor Summary | |
---|---|
AnnotationBasedPersistentProperty(Field field,
PropertyDescriptor propertyDescriptor,
PersistentEntity<?,P> owner,
SimpleTypeHolder simpleTypeHolder)
Creates a new AnnotationBasedPersistentProperty . |
Method Summary | ||
---|---|---|
|
findAnnotation(Class<? extends A> annotationType)
Returns the annotation found for the current AnnotationBasedPersistentProperty . |
|
String |
getSpelExpression()
Inspects a potentially available Value annotation at the property and returns the String value of
it. |
|
protected 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()
Considers plain transient fields, fields annotated with Transient , Value or Autowired as
transien. |
|
boolean |
isVersionProperty()
Returns whether the current property is a potential version property of the owning PersistentEntity . |
|
String |
toString()
|
Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty |
---|
createAssociation, equals, getActualType, getAssociation, getComponentType, getField, getGetter, getMapValueType, getName, getOwner, getPersistentEntityType, getRawType, getSetter, getType, getTypeInformation, hashCode, isArray, isCollectionLike, isEntity, isMap, shallBePersisted |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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()
Transient
, Value
or Autowired
as
transien.
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<? extends A> annotationType)
AnnotationBasedPersistentProperty
. Will prefer field
annotations over ones found at getters or setters.
annotationType
- must not be null.
protected boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
annotationType
- the annotation type to look up.
public String toString()
toString
in class AbstractPersistentProperty<P extends PersistentProperty<P>>
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |