2.8.3: 2008-10-15

net.sf.basedb.core.data
Class ProjectData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.OwnedData
          extended by net.sf.basedb.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, Authentication overview
Last modified
$Date: 2008-09-05 17:16:27 +0200 (Fri, 05 Sep 2008) $
Hibernate: class
table="`Projects`" lazy="false"

Field Summary
private  String description
           
private  Map<GroupData,Integer> groups
           
private  String name
           
private  Map<String,String> projectDefaults
           
private  Set<ProjectKeyData> projectKeys
           
private  boolean removed
           
private  Map<UserData,Integer> users
           
 
Fields inherited from interface net.sf.basedb.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.
 Map<String,String> getProjectDefaults()
          Gets the default values
(package private)  Set<ProjectKeyData> getProjectKeys()
          This is the inverse end.
 Map<UserData,Integer> getUsers()
          Get the map that manages which users are members of this project and their permissions.
 boolean isRemoved()
          Check if the removed flag is set for this item.
 void setDescription(String description)
          Set the description for the item.
(package private)  void setGroups(Map<GroupData,Integer> groups)
           
 void setName(String name)
          Set the name of the item.
(package private)  void setProjectDefaults(Map<String,String> projectDefaults)
           
(package private)  void setProjectKeys(Set<ProjectKeyData> projectKeys)
           
 void setRemoved(boolean removed)
          Set the removed flag for this item.
(package private)  void setUsers(Map<UserData,Integer> users)
           
 
Methods inherited from class net.sf.basedb.core.data.OwnedData
getOwner, setOwner
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
 

Field Detail

name

private String name

description

private String description

removed

private boolean removed

users

private Map<UserData,Integer> users

groups

private Map<GroupData,Integer> groups

projectKeys

private Set<ProjectKeyData> projectKeys

projectDefaults

private Map<String,String> projectDefaults
Constructor Detail

ProjectData

public ProjectData()
Method Detail

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="net.sf.basedb.core.data.UserData"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-element
column="`permission`" type="int" not-null="true"

setUsers

void setUsers(Map<UserData,Integer> users)

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="net.sf.basedb.core.data.GroupData"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-element
column="`permission`" type="int" not-null="true"

setGroups

void setGroups(Map<GroupData,Integer> groups)

getProjectKeys

Set<ProjectKeyData> getProjectKeys()
This is the inverse end.

See Also:
ProjectKeyData.getProjects()
Hibernate: set
table="`ProjectKeys`" lazy="true"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-many-to-many
column="`key_id`" class="net.sf.basedb.core.data.ProjectKeyData"

setProjectKeys

void setProjectKeys(Set<ProjectKeyData> projectKeys)

getProjectDefaults

public Map<String,String> getProjectDefaults()
Gets the default values

Hibernate: map
table="`ProjectDefaults`" lazy="true"
Hibernate: collection-key
column="`project_id`"
Hibernate: collection-index
column="`name`" type="string" length="255" not-null="true"
Hibernate: collection-element
column="`value`" type="string" length="255" not-null="true"

setProjectDefaults

void setProjectDefaults(Map<String,String> projectDefaults)

2.8.3: 2008-10-15