private void updateTimestamps(Object entity, boolean create)
{
long systime = System.currentTimeMillis();
List<Property<Object>> properties = new LinkedList<Property<Object>>();
PropertyQuery<Object> query = PropertyQueries.<Object> createQuery(entity.getClass())
.addCriteria(new AnnotatedPropertyCriteria(ModifiedOn.class));
properties.addAll(query.getWritableResultList());
if (create)
{
query = PropertyQueries.<Object> createQuery(entity.getClass())
.addCriteria(new AnnotatedPropertyCriteria(CreatedOn.class));
properties.addAll(query.getWritableResultList());
}
for (Property<Object> property : properties)
{
setProperty(entity, property, systime, create);