public abstract class ProjectPermission extends java.lang.Object implements java.lang.Comparable<ProjectPermission>
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
.
Modifier and Type | Field and Description |
---|---|
(package private) int |
permission |
(package private) int |
projectId |
Constructor and Description |
---|
ProjectPermission()
Create a new
ProjectPermission object. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ProjectPermission other)
Compare the projectId of this object to the projectId of
another
ProjectPermission object. |
int |
getPermission()
Get the permission.
|
int |
getProjectId()
Get the id of the project.
|
void |
setPermission(int permission)
Set the permission.
|
void |
setProjectId(int projectId)
Set the id of the project.
|
public ProjectPermission()
ProjectPermission
object.public final int getProjectId()
public final void setProjectId(int projectId)
public final int getPermission()
public final void setPermission(int permission)
public final int compareTo(ProjectPermission other)
ProjectPermission
object.compareTo
in interface java.lang.Comparable<ProjectPermission>