Class Function

java.lang.Object
africa.absa.inception.security.Function
All Implemented Interfaces:
Serializable

@Entity public class Function extends Object implements Serializable
The Function class holds the information for a discrete unit of functionality for an application that can be assigned to Roles.
Author:
Marcus Portmann
See Also:
  • Constructor Details

    • Function

      public Function()
      Constructs a new Function.
    • Function

      public Function(String code, String name, String description)
      Constructs a new Function.
      Parameters:
      code - the code for the function
      name - the name of the function
      description - the description for the function
  • Method Details

    • equals

      public boolean equals(Object object)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      object - the reference object with which to compare
      Returns:
      true if this object is the same as the object argument otherwise false
    • getCode

      public String getCode()
      Returns the code for the function.
      Returns:
      the code for the function
    • getDescription

      public String getDescription()
      Returns the description for the function.
      Returns:
      the description for the function
    • getName

      public String getName()
      Returns the name of the function.
      Returns:
      the name of the function
    • getRoles

      public Set<Role> getRoles()
      Returns the roles the user is associated with.
      Returns:
      the roles the user is associated with
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for the object
    • setCode

      public void setCode(String code)
      Set the code for the function.
      Parameters:
      code - the code for the function
    • setDescription

      public void setDescription(String description)
      Set the description for the function.
      Parameters:
      description - the description for the function
    • setName

      public void setName(String name)
      Set the name of the function.
      Parameters:
      name - the name of the function
    • setRoles

      public void setRoles(Set<Role> roles)
      Set the roles the user is associated with.
      Parameters:
      roles - the roles the user is associated with