- Where Developers Learn, Share, & Build Careers


I try to modify AuthenticatedUser to store a list of AdminRole I am doing Authenticated user is the class used by all my applications; It enters a session when the user logs successfully. Now I want to add a list of authorization roles in the user session. Although each application defines a AdminRole class differently, for example, my data center application store in the database:

  employee_id role_name site_name receive_email   

All of my applications will not need the receive_email field or expand their own methods I thought it was called for an abstract class. But Eclipse is complaining about the wrong type on the authorized_fel_list setter in this snippet.

  DataCenterAdminRoleDAO dcAdminDao = New DataCenterAdminRoleDAO (); {List & lt; DataCenterAdminRole & gt; Authorized_roles = dcAdminDao.getAuthorizedRoleListByBadge (authenticatedUser.getBadge ()); AuthenticatedUser.setAuthorized_role_list (authorized_roles); === class public class authenticatedConfigure employee implementation Serializable {Private Static last long serial VERSIONUID = 1 L; Private list & amp; Amp; AdminRole & gt; Authorized_role_list; ...} Public Abstract Class AdminRole Serializable Applicable {Private Static Final Long Serial VERSIONUID = 1 L; Private string role_name; // regular, admin, editor, etc. Private string site_id; // Company's branches ...} public class DataCenterAdminRole to implement AdminRole SerialJobs {  

Obviously a AdminRole list for fixing my dataconter inequality But I thought I could pass the subclasses by increasing the intangible class. What am I missing?

If this is a setter that is causing you problems then you can use less bundles Authorized_roles_list

  private list & lt;? A wildcard on AdminRole and gt; Authorized_role_list; .... Public Set authorized_fal_list (list & lt;; AdminRole & gt; authorized_rollles expanded) {...}    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -