refactor setter and getter methods to Entity