Class PrincipalImplementation
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.implementation.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PrincipalImplementation()
Default constructor forPrincipalImplementation
is necessary for PojoInstantiator of HIBERNATE.protected
PrincipalImplementation(java.lang.String name, java.lang.String type)
Constructor for PrincipalImplementation.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
protected int
getId()
Getter for the fieldid
.java.lang.String
getName()
Getter for the fieldname
.protected java.util.Set<EdalPermissionImplementation>
getPermissions()
Getter for the fieldpermissions
.java.lang.String
getType()
Getter for the fieldtype
.int
hashCode()
protected void
setId(int id)
Setter for the fieldid
.protected void
setName(java.lang.String name)
Setter for the fieldname
.protected void
setPermissions(java.util.Set<EdalPermissionImplementation> permissions)
Setter for the fieldpermissions
.protected void
setType(java.lang.String type)
Setter for the fieldtype
.java.security.Principal
toPrincipal()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PrincipalImplementation
protected PrincipalImplementation()
Default constructor forPrincipalImplementation
is necessary for PojoInstantiator of HIBERNATE.
-
PrincipalImplementation
protected PrincipalImplementation(java.lang.String name, java.lang.String type)
Constructor for PrincipalImplementation.- Parameters:
name
- aString
object.type
- aString
object.
-
-
Method Detail
-
getId
protected int getId()
Getter for the fieldid
.- Returns:
- the id
-
setId
protected void setId(int id)
Setter for the fieldid
.- Parameters:
id
- the id to set
-
getName
public java.lang.String getName()
Getter for the fieldname
.- Specified by:
getName
in interfacejava.security.Principal
- Returns:
- the name
-
setName
protected void setName(java.lang.String name)
Setter for the fieldname
.- Parameters:
name
- the name to set
-
getType
public java.lang.String getType()
Getter for the fieldtype
.- Returns:
- the type
-
setType
protected void setType(java.lang.String type)
Setter for the fieldtype
.- Parameters:
type
- the type to set
-
setPermissions
protected void setPermissions(java.util.Set<EdalPermissionImplementation> permissions)
Setter for the fieldpermissions
.- Parameters:
permissions
- the permissions to set
-
getPermissions
protected java.util.Set<EdalPermissionImplementation> getPermissions()
Getter for the fieldpermissions
.- Returns:
- the permissions
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
-
toPrincipal
public java.security.Principal toPrincipal() throws EdalException
- Throws:
EdalException
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.lang.Object
-
-