public Item constructItem(int indexColumnValue, int reverseIndexColumnValue) {
// since construct item needs to know what the current size is (including added items)
// to populate Index and ReverseIndex we should provide it somehow here!
// At the moment adding multiple items leads to strange behaviour.
PropertysetItem item = new PropertysetItem();
for (Object propertyId : this.definition.getPropertyIds()) {
Object value = null;
if ("Index".equals(propertyId)) {
value = indexColumnValue;
} else if ("ReverseIndex".equals(propertyId)) {
value = reverseIndexColumnValue;
} else {
value = this.definition.getPropertyDefaultValue(propertyId);
}
item.addItemProperty(propertyId, new ObjectProperty(
value,
this.definition.getPropertyType(propertyId),
this.definition.isPropertyReadOnly(propertyId)
));