Package org.faktorips.runtime
Class ObjectProperty
- java.lang.Object
-
- org.faktorips.runtime.ObjectProperty
-
- All Implemented Interfaces:
java.io.Serializable
public class ObjectProperty extends java.lang.Object implements java.io.SerializableAn 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectProperty(java.lang.Object object)Creates anObjectPropertythat characterizes only the object but not a specific property of it.ObjectProperty(java.lang.Object object, java.lang.String property)Creates anObjectPropertythat characterizes the object and the name of the property.ObjectProperty(java.lang.Object object, java.lang.String property, int index)Creates a new ObjectProperty.ObjectProperty(java.lang.Object object, java.lang.String property, int index, IPropertyQualifier qualifier)Creates a newObjectProperty.ObjectProperty(java.lang.Object object, java.lang.String property, IPropertyQualifier qualifier)Creates a newObjectProperty.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetIndex()In case ofgetObject()is an array or list this index defines which object of the index is referenced.java.lang.ObjectgetObject()The object that is identified by thisObjectProperty.java.lang.StringgetProperty()The name of the property that is identified by thisObjectProperty.IPropertyQualifiergetQualifier()Returns theIPropertyQualifierdefined at the instantiation of thisObjectProperty.inthashCode()booleanhasIndex()Returns whether thisObjectPropertyhas an index that identifies an object in an array or list.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ObjectProperty
public ObjectProperty(java.lang.Object object, java.lang.String property, int index, IPropertyQualifier qualifier)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
public ObjectProperty(java.lang.Object object, java.lang.String property, IPropertyQualifier qualifier)Creates a newObjectProperty.It is possible to provide additional information using the qualifier and implementing the interface
IPropertyQualifier.
-
ObjectProperty
public ObjectProperty(java.lang.Object object, java.lang.String property, int index)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
public ObjectProperty(java.lang.Object object, java.lang.String property)Creates anObjectPropertythat characterizes the object and the name of the property.
-
ObjectProperty
public ObjectProperty(java.lang.Object object)
Creates anObjectPropertythat characterizes only the object but not a specific property of it.
-
-
Method Detail
-
getObject
public java.lang.Object getObject()
The object that is identified by thisObjectProperty.
-
getProperty
public java.lang.String 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:
hasIndex()
-
getQualifier
public IPropertyQualifier 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
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-