Package net.sf.basedb.core.data
Class AnnotationData
java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.AnnotationData
- All Implemented Interfaces:
IdentifiableData
,LoggableData
,NoAutoUnlinkAnyToAny
This class holds information about an annotation
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Hibernate: class
- table="`Annotations`" lazy="false"
-
Field Summary
Modifier and TypeFieldDescriptionprivate AnnotationSetData
private AnnotationTypeData
private AnnotationData
private Set<AnnotationData>
private Date
private int
private int
private int
private UnitData
private ParameterValueData<?>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the annotation set this annotation primarily belongs to.Get the type of this annotation.The parent annotation if this is an inherited or cloned annotation.(package private) Set<AnnotationData>
Other annotations which inherit this annotation.Get the date and time the values in this annotation was last updated.int
The ID of the default annotation that this project-specific annotation is overriding. 0 for default annotations.int
The ID of the project that this annotation belongs to. 0 is used for default annotations.int
The annotation source. 0 = primary, 1 = inherited, 2 = cloned For primary annotations, only one annotation per annotation type is supported.getUnit()
Get the unit used for the annotation values.The values of this annotation.void
setAnnotationSet
(AnnotationSetData annotationSet) void
setAnnotationType
(AnnotationTypeData annotationType) void
setInheritedFrom
(AnnotationData inheritedFrom) (package private) void
setInheritingAnnotations
(Set<AnnotationData> inheritingAnnotations) void
setLastUpdate
(Date lastUpdate) void
setOverrideId
(int overrideId) void
setProjectId
(int projectId) void
setSource
(int source) void
void
setValues
(ParameterValueData<?> values) Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
Field Details
-
annotationSet
-
annotationType
-
projectId
private int projectId -
overrideId
private int overrideId -
source
private int source -
inheritedFrom
-
unit
-
values
-
lastUpdate
-
inheritingAnnotations
-
-
Constructor Details
-
AnnotationData
public AnnotationData()
-
-
Method Details
-
getAnnotationSet
Get the annotation set this annotation primarily belongs to.- Hibernate: column
- name="`annotationset_id`" not-null="true"
- Hibernate: many-to-one
- outer-join="false" update="false"
-
setAnnotationSet
-
getAnnotationType
Get the type of this annotation.- Hibernate: column
- name="`annotationtype_id`" not-null="true"
- Hibernate: many-to-one
- outer-join="false" update="false"
-
setAnnotationType
-
getProjectId
public int getProjectId()The ID of the project that this annotation belongs to. 0 is used for default annotations.- Hibernate: property
- type="int"
- Hibernate: column
- name="`project_id`" not-null="true" update="false" index="project_idx"
-
setProjectId
public void setProjectId(int projectId) -
getOverrideId
public int getOverrideId()The ID of the default annotation that this project-specific annotation is overriding. 0 for default annotations.- Hibernate: property
- type="int"
- Hibernate: column
- name="`override_id`" not-null="true" update="false" index="override_idx"
-
setOverrideId
public void setOverrideId(int overrideId) -
getSource
public int getSource()The annotation source. 0 = primary, 1 = inherited, 2 = cloned For primary annotations, only one annotation per annotation type is supported. Inherited annotations should take values, units, etc. from the parent annotation Cloned annotations may have different values and units due to changes on the parent item or this item. The link to the parent item can be lost if the annotation is deleted from the parent.- Since:
- 3.6
- Hibernate: property
- column="`source`" type="int" not-null="true" update="false"
-
setSource
public void setSource(int source) -
getInheritedFrom
The parent annotation if this is an inherited or cloned annotation. Null otherwise. NOTE! Can be null also for cloned annotations if the parent annotation has been deleted.- Since:
- 3.6
- Hibernate: many-to-one
- column="`inherited_id`" not-null="false" update="false" outer-join="false"
-
setInheritedFrom
-
getUnit
Get the unit used for the annotation values. NOTE! The value is always null for annotation types that doesn't specify a quantity, and is always not null for annotation types that does. It is not possible to change between null and non-null.- Since:
- 2.9
- Hibernate: many-to-one
- column="`unit_id`" not-null="false" outer-join="false"
-
setUnit
- Since:
- 2.9
-
getValues
The values of this annotation.- Hibernate: many-to-one
- column="`value_id`" not-null="false" update="false" cascade="all" unique="true"
-
setValues
-
getLastUpdate
Get the date and time the values in this annotation was last updated.- Returns:
- A
Date
object, or null if not known - Hibernate: property
- column="`last_update`" type="timestamp" not-null="false"
-
setLastUpdate
-
getInheritingAnnotations
Set<AnnotationData> getInheritingAnnotations()Other annotations which inherit this annotation. This is the inverse end. seegetInheritedFrom()
- Hibernate: set
- lazy="true" inverse="true" cascade="delete"
- Hibernate: collection-key
- column="`inherited_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.AnnotationData"
-
setInheritingAnnotations
-