Package org.faktorips.runtime
Class ObjectProperty
java.lang.Object
org.faktorips.runtime.ObjectProperty
- All Implemented Interfaces:
Serializable
An instance of this class identifies a property in an object, e.g. the name property of a
specific person.
To add custom information that additionally qualifies the object property, it is possible to
implement and use an IPropertyQualifier.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionObjectProperty(Object object) Creates anObjectPropertythat characterizes only the object but not a specific property of it.ObjectProperty(Object object, String property) Creates anObjectPropertythat characterizes the object and the name of the property.ObjectProperty(Object object, String property, int index) Creates a new ObjectProperty.ObjectProperty(Object object, String property, int index, IPropertyQualifier qualifier) Creates a newObjectProperty.ObjectProperty(Object object, String property, IPropertyQualifier qualifier) Creates a newObjectProperty. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetIndex()In case ofgetObject()is an array or list this index defines which object of the index is referenced.The object that is identified by thisObjectProperty.The name of the property that is identified by thisObjectProperty.Returns theIPropertyQualifierdefined at the instantiation of thisObjectProperty.inthashCode()booleanhasIndex()Returns whether thisObjectPropertyhas an index that identifies an object in an array or list.toString()
-
Constructor Details
-
ObjectProperty
Creates a newObjectProperty. If the property is a list or an array the index can specify the position within the property. An index smaller than 0 indicates that it is not an indexed property.It is possible to provide additional information using the qualifier and implementing the interface
IPropertyQualifier. -
ObjectProperty
Creates a newObjectProperty.It is possible to provide additional information using the qualifier and implementing the interface
IPropertyQualifier. -
ObjectProperty
Creates a new ObjectProperty. If the property is a list or an array the index can specify the position within the property. An index smaller than 0 indicates that it is not an indexed property. -
ObjectProperty
Creates anObjectPropertythat characterizes the object and the name of the property. -
ObjectProperty
Creates anObjectPropertythat characterizes only the object but not a specific property of it.
-
-
Method Details
-
getObject
The object that is identified by thisObjectProperty. -
getProperty
The name of the property that is identified by thisObjectProperty. The property name should be available as bean property in the given object. -
getIndex
public int getIndex()In case ofgetObject()is an array or list this index defines which object of the index is referenced.- Returns:
- The index of the referenced object in the array/list that is referenced by
getObject(). Returns -1 if there is no index available. - See Also:
-
getQualifier
Returns theIPropertyQualifierdefined at the instantiation of thisObjectProperty.- Returns:
- an
IPropertyQualifiercontaining additional information ornullif no qualifier exists.
-
hasIndex
public boolean hasIndex()Returns whether thisObjectPropertyhas an index that identifies an object in an array or list.- Returns:
trueif thisObjectPropertyreferences an index, false if there is no index available.
-
equals
-
hashCode
public int hashCode() -
toString
-