Class Role


  • @Entity
    public class Role
    extends java.lang.Object
    The entity allowing interaction with the roles table.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String createdby
      String field containing the username of who created this row
      protected java.util.Date createddate
      Date field containing the date and time when the row was created
      protected java.lang.String lastmodifiedby
      String field containing the username of who last modified this row
      protected java.util.Date lastmodifieddate
      Date field containing the data and time when the row was last modified
    • Constructor Summary

      Constructors 
      Constructor Description
      Role()
      Default constructor required by JPA
      Role​(java.lang.String name)
      Given the name, create a new role object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Getter for role name
      long getRoleid()
      Getter for role id
      java.util.Set<UserRoles> getUsers()
      Getter for user role combinations
      void setName​(java.lang.String name)
      Setter for role name
      void setRoleid​(long roleid)
      Setter for role id, used for seeding data
      void setUsers​(java.util.Set<UserRoles> users)
      Setter for user role combinations
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • createdby

        protected java.lang.String createdby
        String field containing the username of who created this row
      • createddate

        protected java.util.Date createddate
        Date field containing the date and time when the row was created

        Temporal(TIMESTAMP) - Sets the precision of the date being saved. In this case Date and Time

      • lastmodifiedby

        protected java.lang.String lastmodifiedby
        String field containing the username of who last modified this row
      • lastmodifieddate

        protected java.util.Date lastmodifieddate
        Date field containing the data and time when the row was last modified

        Temporal(TIMESTAMP) - Sets the precision of the date being saved. In this case Date and Time

    • Constructor Detail

      • Role

        public Role()
        Default constructor required by JPA
      • Role

        public Role​(java.lang.String name)
        Given the name, create a new role object. User gets added later
        Parameters:
        name - the name of the role in uppercase
    • Method Detail

      • getRoleid

        public long getRoleid()
        Getter for role id
        Returns:
        the role id, primary key, (long) of this role
      • setRoleid

        public void setRoleid​(long roleid)
        Setter for role id, used for seeding data
        Parameters:
        roleid - the new role id, primary key, (long) for this role
      • getName

        public java.lang.String getName()
        Getter for role name
        Returns:
        role name (String) in uppercase
      • setName

        public void setName​(java.lang.String name)
        Setter for role name
        Parameters:
        name - the new role name (String) for this role, in uppercase
      • getUsers

        public java.util.Set<UserRoles> getUsers()
        Getter for user role combinations
        Returns:
        A list of user role combinations associated with this role
      • setUsers

        public void setUsers​(java.util.Set<UserRoles> users)
        Setter for user role combinations
        Parameters:
        users - Change the list of user role combinations associated with this role to this one