Last update: 2011-06-23

org.proteios.core.data
Class ProjectData

java.lang.Object
  extended by org.proteios.core.data.BasicData
      extended by org.proteios.core.data.OwnedData
          extended by org.proteios.core.data.ProjectData
All Implemented Interfaces:
IdentifiableData, NameableData, OwnableData, RemovableData

public class ProjectData
extends OwnedData
implements NameableData, RemovableData

This class holds information about a project.

Version:
2.0
Author:
Nicklas
See Also:
Project
Last modified
$Date: 2009-09-07 11:06:52 +0200 (Mon, 07 Sep 2009) $
Hibernate: class
table="`Projects`" lazy="false"

Field Summary
 
Fields inherited from interface org.proteios.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Constructor Summary
ProjectData()
           
 
Method Summary
 String getDescription()
          Get the description for the item.
 Map<GroupData,Integer> getGroups()
          Get the map that manages which users are members of this project and their permissions.
 String getName()
          Get the name of the item.
 DirectoryData getProjectDirectory()
           
 int getProjectType()
          0 - Undefined 1 - Gel based Project 2 - Non gel based, this should be more specific
 Map<UserData,Integer> getUsers()
          Get the map that manages which users are members of this project and their permissions.
 boolean isClosed()
           
 boolean isRemoved()
          Check if the removed flag is set for this item.
 void setClosed(boolean closed)
           
 void setDescription(String description)
          Set the description for the item.
 void setName(String name)
          Set the name of the item.
 void setProjectDirectory(DirectoryData projectDirectory)
           
 void setProjectType(int projectType)
           
 void setRemoved(boolean removed)
          Set the removed flag for this item.
 
Methods inherited from class org.proteios.core.data.OwnedData
getOwner, setOwner
 
Methods inherited from class org.proteios.core.data.BasicData
equals, getId, getVersion, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.data.IdentifiableData
getId, getVersion
 

Constructor Detail

ProjectData

public ProjectData()
Method Detail

getProjectDirectory

public DirectoryData getProjectDirectory()
Hibernate: many-to-one
column="`project_directory_id`" not-null="false" outer-join="false"

setProjectDirectory

public void setProjectDirectory(DirectoryData projectDirectory)

getProjectType

public int getProjectType()
0 - Undefined 1 - Gel based Project 2 - Non gel based, this should be more specific

Hibernate: property
column="`project_type`" not-null="false" type="int"

setProjectType

public void setProjectType(int projectType)

getName

public String getName()
Description copied from interface: NameableData
Get the name of the item.

Specified by:
getName in interface NameableData
Returns:
A String with the name of the item

setName

public void setName(String name)
Description copied from interface: NameableData
Set the name of the item. The name cannot be null and mustn't be longer than the value specified by the MAX_NAME_LENGTH constant.

Specified by:
setName in interface NameableData
Parameters:
name - The new name for the item

getDescription

public String getDescription()
Description copied from interface: NameableData
Get the description for the item.

Specified by:
getDescription in interface NameableData
Returns:
A String with a description of the item

setDescription

public void setDescription(String description)
Description copied from interface: NameableData
Set the description for the item. The description can be null but mustn't be longer than the value specified by the MAX_DESCRIPTION_LENGTH constant.

Specified by:
setDescription in interface NameableData
Parameters:
description - The new description for the item

isRemoved

public boolean isRemoved()
Description copied from interface: RemovableData
Check if the removed flag is set for this item.

Specified by:
isRemoved in interface RemovableData
Returns:
TRUE if the item is flagged as removed, FALSE otherwise

setRemoved

public void setRemoved(boolean removed)
Description copied from interface: RemovableData
Set the removed flag for this item.

Specified by:
setRemoved in interface RemovableData
Parameters:
removed - TRUE if the item should be flagged as removed, FALSE otherwise

getUsers

public Map<UserData,Integer> getUsers()
Get the map that manages which users are members of this project and their permissions.

Hibernate: map
table="`UserProjects`" lazy="true"
Hibernate: index-many-to-many
column="`user_id`" class="org.proteios.core.data.UserData"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-element
column="`permission`" type="int" not-null="true"

getGroups

public Map<GroupData,Integer> getGroups()
Get the map that manages which users are members of this project and their permissions.

Hibernate: map
table="`GroupProjects`" lazy="true"
Hibernate: index-many-to-many
column="`group_id`" class="org.proteios.core.data.GroupData"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-element
column="`permission`" type="int" not-null="true"

isClosed

public boolean isClosed()
Returns:
TRUE if the project has been closed
Hibernate: property
column="`closed`" type="boolean" not-null="true"

setClosed

public void setClosed(boolean closed)

Last update: 2011-06-23