Class ProjectData

All Implemented Interfaces:
AnnotatableData, IdentifiableData, LoggableData, NameableData, OwnableData, RegisteredData, RemovableData

public class ProjectData
extends OwnedData
implements NameableData, RemovableData, RegisteredData, AnnotatableData, LoggableData
This class holds information about a project.
Version:
2.0
Author:
Nicklas
See Also:
Project, Developer documentation: User authentication
Last modified
$Date: 2016-10-17 10:38:36 +0200 (må, 17 okt 2016) $
Hibernate: class
table="`Projects`" lazy="false"
  • Field Details

  • Constructor Details

    • ProjectData

      public ProjectData()
  • Method Details

    • 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
    • getRemovedBy

      public Integer getRemovedBy()
      Description copied from interface: RemovableData
      Get the ID of the user that removed this item.
      Specified by:
      getRemovedBy in interface RemovableData
      Returns:
      The ID of a user or null if the item is not removed
    • setRemovedBy

      public void setRemovedBy​(Integer removedBy)
      Description copied from interface: RemovableData
      Set the ID of the user that removed this item or null to restore the item.
      Specified by:
      setRemovedBy in interface RemovableData
    • getEntryDate

      public Date getEntryDate()
      Description copied from interface: RegisteredData
      Get the date this item was added to the database. The value is generated at creation time and can't be modified later.
      Specified by:
      getEntryDate in interface RegisteredData
    • setEntryDate

      public void setEntryDate​(Date entryDate)
    • getAnnotationSet

      public AnnotationSetData getAnnotationSet()
      Description copied from interface: AnnotatableData
      Get the annotation set that holds the annotations for an item.
      Specified by:
      getAnnotationSet in interface AnnotatableData
      Returns:
      An AnnotationSetData item or null if no annotations exist
      Since:
      3.10
    • setAnnotationSet

      public void setAnnotationSet​(AnnotationSetData annotationSet)
      Description copied from interface: AnnotatableData
      Change the annotation set. Use null to remove the annotations.
      Specified by:
      setAnnotationSet in interface AnnotatableData
      Parameters:
      annotationSet - Annotation set to change to.
      Since:
      3.10
    • getAnnotations

      public Set<AnnotationLink> getAnnotations()
      Description copied from interface: AnnotatableData
      Short-cut to all annotations belonging to this item. Used for HQL queries only. This is the inverse end. NOTE! The property-ref="annotationSet" require that AnnotationSetData implements Serializable
      Specified by:
      getAnnotations in interface AnnotatableData
      Since:
      3.10
    • setAnnotations

      void setAnnotations​(Set<AnnotationLink> links)
    • getAutoPermission

      public int getAutoPermission()
      The permissions to use with automatic sharing to this project.
      Since:
      2.10
      Hibernate: property
      column="`auto_permission`" type="int" not-null="true"
    • setAutoPermission

      public void setAutoPermission​(int autoPermission)
    • getPermissionTemplate

      public PermissionTemplateData getPermissionTemplate()
      A permission template can be used to set default permissions when this project is active.
      Returns:
      A permission template or null
      Since:
      2.16
      Hibernate: many-to-one
      column="`permissiontemplate_id`" not-null="false"
    • setPermissionTemplate

      public void setPermissionTemplate​(PermissionTemplateData permissionTemplate)
    • 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)
    • getDefaultItems

      public ItemParameterValueData getDefaultItems()
      The default items to use in this project
      Hibernate: many-to-one
      column="`defaultitems_id`" not-null="false" cascade="all" unique="true"
    • setDefaultItems

      public void setDefaultItems​(ItemParameterValueData defaultItems)