Class AnnotationData

    • Constructor Detail

      • AnnotationData

        public AnnotationData()
    • Method Detail

      • getAnnotationSet

        public AnnotationSetData 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

        public void setAnnotationSet​(AnnotationSetData annotationSet)
      • getAnnotationType

        public AnnotationTypeData 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

        public void setAnnotationType​(AnnotationTypeData annotationType)
      • 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

        public AnnotationData 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

        public void setInheritedFrom​(AnnotationData inheritedFrom)
      • getUnit

        public UnitData 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

        public void setUnit​(UnitData unit)
        Since:
        2.9
      • getValues

        public ParameterValueData<?> getValues()
        The values of this annotation.
        Hibernate: many-to-one
        column="`value_id`" not-null="false" update="false" cascade="all" unique="true"
      • getLastUpdate

        public Date 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

        public void setLastUpdate​(Date lastUpdate)
      • getInheritingAnnotations

        Set<AnnotationData> getInheritingAnnotations()
        Other annotations which inherit this annotation. This is the inverse end. see getInheritedFrom()
        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

        void setInheritingAnnotations​(Set<AnnotationData> inheritingAnnotations)