| java.lang.Object net.sf.jmoney.model2.PropertyAccessor
All known Subclasses: net.sf.jmoney.model2.ListPropertyAccessor, net.sf.jmoney.model2.ScalarPropertyAccessor,
PropertyAccessor | abstract public class PropertyAccessor (Code) | | This class contains information about a property. The property may be in the base
bookkeeping class or in an extension bookkeeping class.
This object contains the metadata.
Some properties may be allowed to take null values and
some may not. The determination is made by the JMoney framework
by looking at the type returned by the getter method.
The following properties may take null values:
- All properties that reference extendable objects
- All properties of type String, Date or other such simple class
- All properties where the type is one of the classes representing intrinsic types,
such as Integer, Long
The following properties may not take null values:
- All properties where the type is an intrinsic type, such as int, long
author: Nigel Westbury |
Method Summary | |
public String | getDisplayName() A short description that is suitable as a column header when this
property is displayed in a table. | public int | getIndexIntoConstructorParameters() the index into the constructor parameters, wherean index of zero indicates that the property is thefirst parameter to the constructor. | public String | getLocalName() The local name of the property is just the last part of the name, after
the last dot. | public String | getName() Return a name for this property.
This name is used by the framework for persisting information about the property
in configuration files etc. | public PropertySet | getPropertySet() Returns the property set which contains this property. | abstract public boolean | isList() Indicates if the property is a list of intrinsic values or objects. | public boolean | isScalar() | public void | setIndexIntoConstructorParameters(int indexIntoConstructorParameters) |
indexIntoConstructorParameters | protected int indexIntoConstructorParameters(Code) | | Index into the list of parameters passed to the constructor.
Zero indicates that this property is passed as the first
parameter to the constructor.
|
PropertyAccessor | public PropertyAccessor(PropertySet propertySet, String localName, String displayName, Class<? extends ExtendableObject> listItemClass)(Code) | | Create a property accessor for a list property.
Parameters: set - Parameters: name - Parameters: listItemClass - Parameters: displayName - Parameters: propertyDependency - |
getDisplayName | public String getDisplayName()(Code) | | A short description that is suitable as a column header when this
property is displayed in a table.
|
getIndexIntoConstructorParameters | public int getIndexIntoConstructorParameters()(Code) | | the index into the constructor parameters, wherean index of zero indicates that the property is thefirst parameter to the constructor. An index of -1indicates that the property is not passed to theconstructor (the property value is redundant and theobject can be fully re-constructed from the otherproperties). |
getLocalName | public String getLocalName()(Code) | | The local name of the property is just the last part of the name, after
the last dot. This will be unique within an extension but may not be
unique across all plugins or even across extensions to different types of
bookkeeping objects (entries, categories, transactions, or commodities)
within a plug-in.
|
getName | public String getName()(Code) | | Return a name for this property.
This name is used by the framework for persisting information about the property
in configuration files etc. For example, if the user sorts a column based on a
property then that information can be stored in a configuration file so that the
data is sorted on the column the next time the user loads the view.
|
getPropertySet | public PropertySet getPropertySet()(Code) | | Returns the property set which contains this property.
|
isList | abstract public boolean isList()(Code) | | Indicates if the property is a list of intrinsic values or objects.
|
isScalar | public boolean isScalar()(Code) | | Indicates if the property is a single intrinsic value or object
(not a list of values)
|
setIndexIntoConstructorParameters | public void setIndexIntoConstructorParameters(int indexIntoConstructorParameters)(Code) | | Parameters: indexIntoConstructorParameters - |
|
|