public abstract class PropertyInfo
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
static java.lang.String |
NAME |
Constructor and Description |
---|
PropertyInfo() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
The implementation of this method allows a collection of
PropertyInfo objects to be sorted lexicographically by the property name. |
boolean |
equals(java.lang.Object o) |
protected abstract boolean |
equalsImpl(PropertyInfo info) |
java.util.Collection<java.lang.String> |
getAllowedReferenceTypes()
Gets the list of object types that can be referenced from this property.
|
java.util.Collection |
getAllowedValues()
If the property has a restricted set of allowed values by default, then this method returns those allowed values.
|
protected <T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> clz)
Gets the Annotation instance for this property if it has been annotated.
|
CascadeAction |
getCascadeAction()
Gets the default action to perform when cascasding the delete of a reference.
|
java.lang.String |
getDerivedSourceProperty()
Gets the source property name that this property is derived from.
|
DynamicPropertyProvider |
getDynamicPropertyProvider()
If this property is the root of a dynamic property tree, this returns the DynamicPropertyProvider to get any child PropertyInfos.
|
Nullable.NullBehaviour |
getNullBehaviour()
Gets the NullBehaviour for this property - i.e.
|
protected java.util.Collection<java.lang.Class<? extends DBObject>> |
getObjectClasses()
If this property is restricted to certain object classes this returns those classes.
|
abstract java.lang.Class |
getPropertyClass()
Returns the class expected for values of this property.
|
abstract java.lang.String |
getPropertyName()
Returns the name of the property.
|
java.lang.String |
getPropertyPath()
Deprecated.
since DBObject.getProperty() now works for all bean and property map properties this is no longer required.
|
java.lang.Object |
getPropertyValue(java.lang.Object bean)
Invokes the getter method using
owningObject as the object on which the getter is called. |
protected java.lang.Class<? extends DBObjectProvider> |
getProviderClass()
If this property is restricted to a given provider class this returns that class.
|
java.lang.Class |
getReferencedClass()
If this property is a reference property (i.e.
|
java.lang.String[] |
getReferencedTypes()
If this property is a reference property this returns the object types that can be referenced by the DBObjectID value.
|
protected boolean |
isAfter()
Returns true if the get OR set method for this property has the After annotation.
|
boolean |
isDeprecated()
Returns true if the get OR set method for this property is deprecated.
|
boolean |
isDerived()
Tests if this property is derived from the value of another property.
|
boolean |
isGetTransient()
Returns true if the get method for this property has the Transient annotation.
|
boolean |
isInternalReference()
If this class is a reference property (i.e.
|
boolean |
isNumberPhysicalSize()
Tests whether this is a number property that is a physical size so can be displayed as bytes, kilobytes, megabytes etc.
|
boolean |
isNumberUnlimited()
Tests whether this is a number property that uses zero to signify an UNLIMITED value.
|
boolean |
isSetTransient()
Returns true if the set method for this property has the Transient annotation.
|
boolean |
isStaticReference()
Only valid for properties with a return type of DBObjectID.
|
boolean |
isSupported(java.lang.Class<? extends DBObjectProvider> proClz, java.lang.Class<? extends DBObject> objClz)
Tests whether this property is supported in the given provider for the given object type.
|
boolean |
isTextInternalName()
Tests whether this property is a text property that represents an internal name, and therefore should be externalised before it is used.
|
boolean |
isTextMultiLine()
Tests whether this property is a multi line property - e.g.
|
boolean |
isTextPassword()
Tests whether this property is a password and should therefore be treated with appropriate security.
|
boolean |
isTransient()
Returns true if the get OR set method for this property has the Transient annotation.
|
void |
setPropertyValue(java.lang.Object bean, java.lang.Object value)
Invokes the setter method using
owningObject as the object on which the setter is called, and value as the value passed to the setter. |
public static final java.lang.String ID
public static final java.lang.String NAME
public abstract java.lang.String getPropertyName()
@Deprecated public java.lang.String getPropertyPath()
public abstract java.lang.Class getPropertyClass()
public java.lang.Object getPropertyValue(java.lang.Object bean)
owningObject
as the object on which the getter is called. This method will return null
if any exception occurs while invoking the getter method.public void setPropertyValue(java.lang.Object bean, java.lang.Object value) throws java.lang.Exception
owningObject
as the object on which the setter is called, and value
as the value passed to the setter. If any Exception is encountered invoking the setter it is passed on to the caller.java.lang.Exception
public java.lang.Class getReferencedClass()
public java.lang.String[] getReferencedTypes()
public boolean isInternalReference()
public boolean isGetTransient()
Transient
public boolean isSetTransient()
Transient
public boolean isTransient()
Transient
public boolean isDerived()
Derived
annotation.Derived
public java.lang.String getDerivedSourceProperty()
isDerived()
public boolean isDeprecated()
protected boolean isAfter()
After
public boolean isSupported(java.lang.Class<? extends DBObjectProvider> proClz, java.lang.Class<? extends DBObject> objClz)
proClz
- the desired provider type, if null all provider types are matched.objClz
- the desired object type.protected java.util.Collection<java.lang.Class<? extends DBObject>> getObjectClasses()
protected java.lang.Class<? extends DBObjectProvider> getProviderClass()
public DynamicPropertyProvider getDynamicPropertyProvider()
public int compareTo(java.lang.Object o)
PropertyInfo
objects to be sorted lexicographically by the property name.compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected abstract boolean equalsImpl(PropertyInfo info)
public boolean isStaticReference()
public boolean isTextMultiLine()
public boolean isTextPassword()
public boolean isTextInternalName()
public boolean isNumberUnlimited()
public boolean isNumberPhysicalSize()
public CascadeAction getCascadeAction()
protected <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> clz)
public Nullable.NullBehaviour getNullBehaviour()
public java.util.Collection getAllowedValues()
public java.util.Collection<java.lang.String> getAllowedReferenceTypes()