2.17.2: 2011-06-17

net.sf.basedb.core.data.keyring
Class ProjectPermission

java.lang.Object
  extended by net.sf.basedb.core.data.keyring.ProjectPermission
All Implemented Interfaces:
Comparable<ProjectPermission>
Direct Known Subclasses:
GroupProjects, UserProjects

public abstract class ProjectPermission
extends Object
implements Comparable<ProjectPermission>

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: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
(package private)  int permission
           
(package private)  int projectId
           
 
Constructor Summary
ProjectPermission()
          Create a new ProjectPermission object.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectId

int projectId

permission

int permission
Constructor Detail

ProjectPermission

public ProjectPermission()
Create a new ProjectPermission object.

Method Detail

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

public final int compareTo(ProjectPermission other)
Compare the projectId of this object to the projectId of another ProjectPermission object.

Specified by:
compareTo in interface Comparable<ProjectPermission>

2.17.2: 2011-06-17