It’s totally up to you how you implement the interface. There are just a handful of methods you need to implement, getIdentifier which should return a unique String id for each role and then add/remove/get/setRoles for managing child roles. Your role can be an entity or, for example, an enumeration - it totally depends on your needs and use cases. Anyway, the only actual implementation of the Role interface that I currently have to show you is in the tests package of appfoundation, see
RoleMock for details.