|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.mapping.model.AbstractPersistentProperty<P>
public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>>
Simple impementation of PersistentProperty.
| Field Summary | |
|---|---|
protected Association<P> |
association
|
protected java.lang.reflect.Field |
field
|
protected TypeInformation<?> |
information
|
protected java.lang.String |
name
|
protected PersistentEntity<?,P> |
owner
|
protected java.beans.PropertyDescriptor |
propertyDescriptor
|
protected java.lang.Class<?> |
rawType
|
| Constructor Summary | |
|---|---|
AbstractPersistentProperty(java.lang.reflect.Field field,
java.beans.PropertyDescriptor propertyDescriptor,
PersistentEntity<?,P> owner,
SimpleTypeHolder simpleTypeHolder)
|
|
| Method Summary | |
|---|---|
protected abstract Association<P> |
createAssociation()
|
Association<P> |
getAssociation()
|
java.lang.Class<?> |
getComponentType()
Returns the component type of the type if it is a Collection. |
java.lang.reflect.Field |
getField()
|
java.lang.Class<?> |
getMapValueType()
Returns the type of the values if the property is a Map. |
java.lang.String |
getName()
The name of the property |
PersistentEntity<?,P> |
getOwner()
|
java.lang.Iterable<? extends TypeInformation<?>> |
getPersistentEntityType()
Returns the TypeInformation if the property references a PersistentEntity. |
java.beans.PropertyDescriptor |
getPropertyDescriptor()
Returns the PropertyDescriptor backing the PersistentProperty. |
java.lang.Class<?> |
getRawType()
Returns the raw type as it's pulled from from the reflected property. |
java.lang.String |
getSpelExpression()
|
java.lang.Class<?> |
getType()
The type of the property |
TypeInformation<?> |
getTypeInformation()
|
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. |
protected boolean |
isEntity()
|
boolean |
isMap()
Returns whether the property is a Map. |
boolean |
isTransient()
Returns whether the property is transient. |
boolean |
shallBePersisted()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.data.mapping.PersistentProperty |
|---|
isIdProperty |
| Field Detail |
|---|
protected final java.lang.String name
protected final java.beans.PropertyDescriptor propertyDescriptor
protected final TypeInformation<?> information
protected final java.lang.Class<?> rawType
protected final java.lang.reflect.Field field
protected final Association<P extends PersistentProperty<P>> association
protected final PersistentEntity<?,P extends PersistentProperty<P>> owner
| Constructor Detail |
|---|
public AbstractPersistentProperty(java.lang.reflect.Field field,
java.beans.PropertyDescriptor propertyDescriptor,
PersistentEntity<?,P> owner,
SimpleTypeHolder simpleTypeHolder)
| Method Detail |
|---|
protected abstract Association<P> createAssociation()
public PersistentEntity<?,P> getOwner()
getOwner in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.String getName()
PersistentProperty
getName in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.Class<?> getType()
PersistentProperty
getType in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.Class<?> getRawType()
PersistentProperty
getRawType in interface PersistentProperty<P extends PersistentProperty<P>>public TypeInformation<?> getTypeInformation()
getTypeInformation in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.Iterable<? extends TypeInformation<?>> getPersistentEntityType()
PersistentPropertyTypeInformation 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.
getPersistentEntityType in interface PersistentProperty<P extends PersistentProperty<P>>public java.beans.PropertyDescriptor getPropertyDescriptor()
PersistentPropertyPropertyDescriptor backing the PersistentProperty.
getPropertyDescriptor in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.reflect.Field getField()
getField in interface PersistentProperty<P extends PersistentProperty<P>>public java.lang.String getSpelExpression()
getSpelExpression in interface PersistentProperty<P extends PersistentProperty<P>>public boolean isTransient()
PersistentProperty
isTransient in interface PersistentProperty<P extends PersistentProperty<P>>public boolean shallBePersisted()
shallBePersisted in interface PersistentProperty<P extends PersistentProperty<P>>public boolean isAssociation()
PersistentPropertyAssociation.
isAssociation in interface PersistentProperty<P extends PersistentProperty<P>>public Association<P> getAssociation()
getAssociation in interface PersistentProperty<P extends PersistentProperty<P>>public boolean isCollectionLike()
PersistentPropertyCollection, Iterable or an array.
isCollectionLike in interface PersistentProperty<P extends PersistentProperty<P>>public boolean isMap()
PersistentPropertyMap.
isMap in interface PersistentProperty<P extends PersistentProperty<P>>public boolean isArray()
PersistentProperty
isArray in interface PersistentProperty<P extends PersistentProperty<P>>protected boolean isEntity()
public java.lang.Class<?> getComponentType()
PersistentPropertyCollection. Will return the type of the key if
the property is a Map.
getComponentType in interface PersistentProperty<P extends PersistentProperty<P>>Collection nor
Map.public java.lang.Class<?> getMapValueType()
PersistentPropertyMap.
getMapValueType in interface PersistentProperty<P extends PersistentProperty<P>>Map
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||