Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.mapping.model
Class AnnotationBasedPersistentProperty<P extends PersistentProperty<P>>

    java.lang.Object
      org.springframework.data.mapping.model.AbstractPersistentProperty<P>
          org.springframework.data.mapping.model.AnnotationBasedPersistentProperty<P>

All Implemented Interfaces:
  PersistentProperty<P>

    public abstract class AnnotationBasedPersistentProperty<P extends PersistentProperty<P>>

extends AbstractPersistentProperty<P>

Special `PersistentProperty` that takes annotations at a property into account.

Author:
  Oliver Gierke

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
`String` | `getSpelExpression()` Inspects a potentially available `Value` annotation at the property and returns the `String` value of it.
`boolean` | `isAssociation()` Considers the property an `Association` if it is annotated with `Reference`.
`boolean` | `isIdProperty()` Regards the property as ID if there is an `Id` annotation found on it.
`boolean` | `isTransient()` Considers plain transient fields, fields annotated with `Transient`, `Value` or `Autowired` as transien.

Methods inherited from class org.springframework.data.mapping.model.AbstractPersistentProperty
`createAssociation, getAssociation, getComponentType, getField, getMapValueType, getName, getOwner, getPropertyDescriptor, getRawType, getType, getTypeInformation, isArray, isCollection, isComplexType, isEntity, isMap`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AnnotationBasedPersistentProperty

    public AnnotationBasedPersistentProperty(Field field,
                                             PropertyDescriptor propertyDescriptor,
                                             PersistentEntity<?,P> owner,
                                             SimpleTypeHolder simpleTypeHolder)

  Creates a new `AnnotationBasedPersistentProperty`.

  Parameters:
    `field` -
    `propertyDescriptor` -
    `owner` -

Method Detail

### getSpelExpression

    public String getSpelExpression()

  Inspects a potentially available `Value` annotation at the property and returns the `String` value of it.

  Specified by:
    `getSpelExpression` in interface `PersistentProperty<P extends PersistentProperty<P>>`
  Overrides:
    `getSpelExpression` in class `AbstractPersistentProperty<P extends PersistentProperty<P>>`
  See Also:
    `AbstractPersistentProperty.getSpelExpression()`

### isTransient

    public boolean isTransient()

  Considers plain transient fields, fields annotated with `Transient`, `Value` or `Autowired` as transien.

  Specified by:
    `isTransient` in interface `PersistentProperty<P extends PersistentProperty<P>>`
  Overrides:
    `isTransient` in class `AbstractPersistentProperty<P extends PersistentProperty<P>>`
  See Also:
    `org.springframework.data.mapping.BasicPersistentProperty#isTransient()`

### isIdProperty

    public boolean isIdProperty()

  Regards the property as ID if there is an `Id` annotation found on it.

### isAssociation

    public boolean isAssociation()

  Considers the property an `Association` if it is annotated with `Reference`.

  Specified by:
    `isAssociation` in interface `PersistentProperty<P extends PersistentProperty<P>>`
  Overrides:
    `isAssociation` in class `AbstractPersistentProperty<P extends PersistentProperty<P>>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.