Add generic onUpdate method to Item class