Package net.sf.basedb.core.data
Interface AnnotatableData
- All Superinterfaces:
IdentifiableData
- All Known Implementing Classes:
AnnotatedData
,ArrayBatchData
,ArrayDesignData
,ArraySlideData
,BioAssayData
,BioAssaySetData
,BioMaterialData
,BioPlateData
,BioSourceData
,DerivedBioAssayData
,ExperimentData
,ExtractData
,FileData
,FileServerData
,HardwareData
,ItemListData
,KitData
,MeasuredBioMaterialData
,PhysicalBioAssayData
,PlateData
,PluginConfigurationData
,PluginDefinitionData
,ProjectData
,ProtocolData
,RawBioAssayData
,RootRawBioAssayData
,SampleData
,SoftwareData
,TagData
,WellData
An annotatable item is an item that can be annotated with
name/value pairs. All annotations are held in an
AnnotationSetData
object.
This interface defines Hibernate database mapping for the
annotationSet
association to a column with
the name annotationset_id
. If a subclass wants
to map the association to another column, it should override
the getAnnotationSet()
method and add a Hibernate tag
in the comment.
Reference implementation
private AnnotationSetData annotationSet; public AnnotationSetData getAnnotationSet() { return annotationSet; } public void setAnnotationSet(AnnotationSetData annotationSet) { this.annotationSet = annotationSet; }
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionShort-cut to all annotations belonging to this item.Get the annotation set that holds the annotations for an item.void
setAnnotationSet
(AnnotationSetData annotationSet) Change the annotation set.Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Method Details
-
getAnnotationSet
Get the annotation set that holds the annotations for an item.- Returns:
- An
AnnotationSetData
item or null if no annotations exist - Hibernate: many-to-one
- column="`annotationset_id`" not-null="false" unique="true" outer-join="false" cascade="delete"
-
setAnnotationSet
Change the annotation set. Use null to remove the annotations.- Parameters:
annotationSet
- Annotation set to change to.
-
getAnnotations
Set<AnnotationLink> getAnnotations()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- Since:
- 3.2
- Hibernate: set
- lazy="true" inverse="true" mutable="false"
- Hibernate: collection-key
- column="`annotationset_id`" property-ref="annotationSet"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.annotations.AnnotationLink"
-