Package net.sf.basedb.core.data.keyring
Class ProjectPermission
java.lang.Object
net.sf.basedb.core.data.keyring.ProjectPermission
- All Implemented Interfaces:
Comparable<ProjectPermission>
- Direct Known Subclasses:
GroupProjects
,UserProjects
Class for holding a project id and a permission value.
It implements the
Comparable
interface to
be able to sort a List
by the projectId
value.
Note! The compareTo
method of this class
is not consistent with the equals
method of
any of the subclasses. Ie. The compareTo
method may return 0, while the equals
method returns FALSE. This is because we need to compare
subclasses to each other while sorting a List
.
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
Modifier and TypeFieldDescription(package private) int
(package private) int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
compareTo
(ProjectPermission other) Compare the projectId of this object to the projectId of anotherProjectPermission
object.final int
Get the permission.final int
Get the id of the project.final void
setPermission
(int permission) Set the permission.final void
setProjectId
(int projectId) Set the id of the project.
-
Field Details
-
projectId
int projectId -
permission
int permission
-
-
Constructor Details
-
ProjectPermission
public ProjectPermission()Create a newProjectPermission
object.
-
-
Method Details
-
getProjectId
public final int getProjectId()Get the id of the project. -
setProjectId
public final void setProjectId(int projectId) Set the id of the project. -
getPermission
public final int getPermission()Get the permission. -
setPermission
public final void setPermission(int permission) Set the permission. -
compareTo
Compare the projectId of this object to the projectId of anotherProjectPermission
object.- Specified by:
compareTo
in interfaceComparable<ProjectPermission>
-