Adding setter and getter for Id, implementing serialization for object conversion