public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>> extends Object implements PersistentProperty<P>
PersistentProperty
.isIdProperty, isVersionProperty
Constructor and Description |
---|
AbstractPersistentProperty(Property property,
PersistentEntity<?,P> owner,
SimpleTypeHolder simpleTypeHolder) |
Modifier and Type | Method and Description |
---|---|
protected abstract Association<P> |
createAssociation() |
boolean |
equals(Object obj) |
Class<?> |
getActualType()
Returns the actual type of the property.
|
Optional<Association<P>> |
getAssociation() |
Optional<Class<?>> |
getComponentType()
Returns the component type of the type if it is a
Collection . |
Optional<Field> |
getField() |
Optional<Method> |
getGetter()
Returns the getter method to access the property value if available.
|
Optional<Class<?>> |
getMapValueType()
Returns the type of the values if the property is a
Map . |
String |
getName()
The name of the property
|
Iterable<? extends TypeInformation<?>> |
getPersistentEntityType()
Returns the
TypeInformation if the property references a PersistentEntity . |
Class<?> |
getRawType()
Returns the raw type as it's pulled from from the reflected property.
|
Optional<Method> |
getSetter()
Returns the setter method to set a property value.
|
Optional<String> |
getSpelExpression() |
Class<?> |
getType()
The type of the property
|
TypeInformation<?> |
getTypeInformation()
Returns the
TypeInformation of the property. |
int |
hashCode() |
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. |
boolean |
isEntity()
Returns whether the type of the
PersistentProperty is actually to be regarded as PersistentEntity
in turn. |
boolean |
isMap()
Returns whether the property is a
Map . |
boolean |
isTransient()
Returns whether the property is transient.
|
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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findAnnotation, findPropertyOrOwnerAnnotation, getOwner, getRequiredAssociation, isAnnotationPresent, isIdProperty, isVersionProperty
public AbstractPersistentProperty(Property property, PersistentEntity<?,P> owner, SimpleTypeHolder simpleTypeHolder)
protected abstract Association<P> createAssociation()
public String getName()
PersistentProperty
getName
in interface PersistentProperty<P extends PersistentProperty<P>>
public Class<?> getType()
PersistentProperty
getType
in interface PersistentProperty<P extends PersistentProperty<P>>
public Class<?> getRawType()
PersistentProperty
getRawType
in interface PersistentProperty<P extends PersistentProperty<P>>
public TypeInformation<?> getTypeInformation()
PersistentProperty
TypeInformation
of the property.getTypeInformation
in interface PersistentProperty<P extends PersistentProperty<P>>
public Iterable<? extends TypeInformation<?>> getPersistentEntityType()
PersistentProperty
TypeInformation
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 Optional<Method> getGetter()
PersistentProperty
getGetter
in interface PersistentProperty<P extends PersistentProperty<P>>
public Optional<Method> getSetter()
PersistentProperty
getSetter
in interface PersistentProperty<P extends PersistentProperty<P>>
public Optional<Field> getField()
getField
in interface PersistentProperty<P extends PersistentProperty<P>>
public Optional<String> getSpelExpression()
getSpelExpression
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isTransient()
PersistentProperty
isTransient
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isWritable()
PersistentProperty
isWritable
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isAssociation()
PersistentProperty
Association
.isAssociation
in interface PersistentProperty<P extends PersistentProperty<P>>
public Optional<Association<P>> getAssociation()
getAssociation
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isCollectionLike()
PersistentProperty
Collection
, Iterable
or an array.isCollectionLike
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isMap()
PersistentProperty
Map
.isMap
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isArray()
PersistentProperty
isArray
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean isEntity()
PersistentProperty
PersistentProperty
is actually to be regarded as PersistentEntity
in turn.isEntity
in interface PersistentProperty<P extends PersistentProperty<P>>
public Optional<Class<?>> getComponentType()
PersistentProperty
Collection
. Will return the type of the key if
the property is a Map
.getComponentType
in interface PersistentProperty<P extends PersistentProperty<P>>
Optional.empty()
if neither Collection
nor Map
.public Optional<Class<?>> getMapValueType()
PersistentProperty
Map
.getMapValueType
in interface PersistentProperty<P extends PersistentProperty<P>>
Optional.empty()
if no Map
public Class<?> getActualType()
PersistentProperty
getActualType
in interface PersistentProperty<P extends PersistentProperty<P>>
public boolean usePropertyAccess()
PersistentProperty
usePropertyAccess
in interface PersistentProperty<P extends PersistentProperty<P>>
Copyright © 2011-2016–2017 Pivotal Software, Inc.. All rights reserved.