Implement method setData()
Remove adding of code & status into resource