Refactored Flag entity to use getters and setters provided by FlagInterface.