public long getAndUpdateLastUpdated(long lastUpdated) {
PropertyManager pm = PropertyManager.getInstance();
Property p = pm.findProperty(null, null, null, STATISTICS_PROPERTIES_CATEGORY, LAST_UPDATED_PROPERTY_NAME);
if (p==null) {
Property newp = pm.createPropertyInstance(null, null, null, STATISTICS_PROPERTIES_CATEGORY, LAST_UPDATED_PROPERTY_NAME, null, lastUpdated, null, null);
pm.saveProperty(newp);
return -1;
} else {
final long result = p.getLongValue();
p.setLongValue(lastUpdated);
pm.saveProperty(p);