Class PrincipalImplementation

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal

    @Entity
    public class PrincipalImplementation
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable
    Class to persist user principals with HIBERNATE.
    See Also:
    Serialized Form
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      protected int getId()
      Getter for the field id.
      java.lang.String getName()
      Getter for the field name.
      protected java.util.Set<EdalPermissionImplementation> getPermissions()
      Getter for the field permissions.
      java.lang.String getType()
      Getter for the field type.
      int hashCode()
      protected void setId​(int id)
      Setter for the field id.
      protected void setName​(java.lang.String name)
      Setter for the field name.
      protected void setPermissions​(java.util.Set<EdalPermissionImplementation> permissions)
      Setter for the field permissions.
      protected void setType​(java.lang.String type)
      Setter for the field type.
      java.security.Principal toPrincipal()  
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • PrincipalImplementation

        protected PrincipalImplementation()
        Default constructor for PrincipalImplementation is necessary for PojoInstantiator of HIBERNATE.
      • PrincipalImplementation

        protected PrincipalImplementation​(java.lang.String name,
                                          java.lang.String type)
        Constructor for PrincipalImplementation.
        Parameters:
        name - a String object.
        type - a String object.
    • Method Detail

      • getId

        protected int getId()
        Getter for the field id.
        Returns:
        the id
      • setId

        protected void setId​(int id)
        Setter for the field id.
        Parameters:
        id - the id to set
      • getName

        public java.lang.String getName()
        Getter for the field name.
        Specified by:
        getName in interface java.security.Principal
        Returns:
        the name
      • setName

        protected void setName​(java.lang.String name)
        Setter for the field name.
        Parameters:
        name - the name to set
      • getType

        public java.lang.String getType()
        Getter for the field type.
        Returns:
        the type
      • setType

        protected void setType​(java.lang.String type)
        Setter for the field type.
        Parameters:
        type - the type to set
      • setPermissions

        protected void setPermissions​(java.util.Set<EdalPermissionImplementation> permissions)
        Setter for the field permissions.
        Parameters:
        permissions - the permissions to set
      • getPermissions

        protected java.util.Set<EdalPermissionImplementation> getPermissions()
        Getter for the field permissions.
        Returns:
        the permissions
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object