Package net.sf.basedb.core.data
Class ProjectData
java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.OwnedData
net.sf.basedb.core.data.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:
- Last modified
- $Date: 2016-10-17 10:38:36 +0200 (må, 17 okt 2016) $
- Hibernate: class
- table="`Projects`" lazy="false"
-
Field Summary
Modifier and TypeFieldDescriptionprivate AnnotationSetData
private int
private ItemParameterValueData
private String
private Date
private Set<AnnotationLink>
private String
private PermissionTemplateData
private Set<ProjectKeyData>
private Integer
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionShort-cut to all annotations belonging to this item.Get the annotation set that holds the annotations for an item.int
The permissions to use with automatic sharing to this project.The default items to use in this projectGet the description for the item.Get the date this item was added to the database.Get the map that manages which users are members of this project and their permissions.getName()
Get the name of the item.A permission template can be used to set default permissions when this project is active.Gets the default values(package private) Set<ProjectKeyData>
This is the inverse end.Get the ID of the user that removed this item.getUsers()
Get the map that manages which users are members of this project and their permissions.(package private) void
setAnnotations
(Set<AnnotationLink> links) void
setAnnotationSet
(AnnotationSetData annotationSet) Change the annotation set.void
setAutoPermission
(int autoPermission) void
setDefaultItems
(ItemParameterValueData defaultItems) void
setDescription
(String description) Set the description for the item.void
setEntryDate
(Date entryDate) (package private) void
void
Set the name of the item.void
setPermissionTemplate
(PermissionTemplateData permissionTemplate) (package private) void
setProjectDefaults
(Map<String, String> projectDefaults) (package private) void
setProjectKeys
(Set<ProjectKeyData> projectKeys) void
setRemovedBy
(Integer removedBy) Set the ID of the user that removed this item or null to restore the item.(package private) void
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 Details
-
name
-
description
-
removedBy
-
entryDate
-
annotationSet
-
links
-
autoPermission
private int autoPermission -
permissionTemplate
-
users
-
groups
-
projectKeys
-
projectDefaults
-
defaultItems
-
-
Constructor Details
-
ProjectData
public ProjectData()
-
-
Method Details
-
getName
Description copied from interface:NameableData
Get the name of the item.- Specified by:
getName
in interfaceNameableData
- Returns:
- A
String
with the name of the item
-
setName
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 theMAX_NAME_LENGTH
constant.- Specified by:
setName
in interfaceNameableData
- Parameters:
name
- The new name for the item
-
getDescription
Description copied from interface:NameableData
Get the description for the item.- Specified by:
getDescription
in interfaceNameableData
- Returns:
- A
String
with a description of the item
-
setDescription
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 theMAX_DESCRIPTION_LENGTH
constant.- Specified by:
setDescription
in interfaceNameableData
- Parameters:
description
- The new description for the item
-
getRemovedBy
Description copied from interface:RemovableData
Get the ID of the user that removed this item.- Specified by:
getRemovedBy
in interfaceRemovableData
- Returns:
- The ID of a user or null if the item is not removed
-
setRemovedBy
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 interfaceRemovableData
-
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 interfaceRegisteredData
-
setEntryDate
-
getAnnotationSet
Description copied from interface:AnnotatableData
Get the annotation set that holds the annotations for an item.- Specified by:
getAnnotationSet
in interfaceAnnotatableData
- Returns:
- An
AnnotationSetData
item or null if no annotations exist - Since:
- 3.10
-
setAnnotationSet
Description copied from interface:AnnotatableData
Change the annotation set. Use null to remove the annotations.- Specified by:
setAnnotationSet
in interfaceAnnotatableData
- Parameters:
annotationSet
- Annotation set to change to.- Since:
- 3.10
-
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 interfaceAnnotatableData
- Since:
- 3.10
-
setAnnotations
-
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
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
-
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
-
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
-
getProjectKeys
Set<ProjectKeyData> getProjectKeys()This is the inverse end.- See Also:
- 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
-
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
-
getDefaultItems
The default items to use in this project- Hibernate: many-to-one
- column="`defaultitems_id`" not-null="false" cascade="all" unique="true"
-
setDefaultItems
-