2.17.2: 2011-06-17

net.sf.basedb.core.data
Class AnnotationData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.AnnotationData
All Implemented Interfaces:
IdentifiableData, LoggableData

public class AnnotationData
extends BasicData
implements LoggableData

This class holds information about an annotation

Version:
2.0
Author:
Nicklas
See Also:
Annotation, Annotations overview
Hibernate: class
table="`Annotations`" lazy="false"

Field Summary
private  AnnotationSetData annotationSet
           
private  AnnotationTypeData annotationType
           
private  Set<AnnotationSetData> inheritingSets
           
private  Date lastUpdate
           
private  UnitData unit
           
private  ParameterValueData<?> values
           
 
Constructor Summary
AnnotationData()
           
 
Method Summary
 AnnotationSetData getAnnotationSet()
          Get the annotation set this annotation primarily belongs to.
 AnnotationTypeData getAnnotationType()
          Get the type of this annotation.
(package private)  Set<AnnotationSetData> getInheritingSets()
          The annotation sets which inherit this annotation.
 Date getLastUpdate()
          Get the date and time the values in this annotation was last updated.
 UnitData getUnit()
          Get the unit used for the annotation values.
 ParameterValueData<?> getValues()
          The values of this annotation.
 void setAnnotationSet(AnnotationSetData annotationSet)
           
 void setAnnotationType(AnnotationTypeData annotationType)
           
(package private)  void setInheritingSets(Set<AnnotationSetData> inheritingSets)
           
 void setLastUpdate(Date lastUpdate)
           
 void setUnit(UnitData unit)
           
 void setValues(ParameterValueData<?> values)
           
 
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
 

Field Detail

annotationSet

private AnnotationSetData annotationSet

annotationType

private AnnotationTypeData annotationType

unit

private UnitData unit

values

private ParameterValueData<?> values

lastUpdate

private Date lastUpdate

inheritingSets

private Set<AnnotationSetData> inheritingSets
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" unique-key="uniquetype"
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" unique-key="uniquetype"
Hibernate: many-to-one
outer-join="false" update="false"

setAnnotationType

public void setAnnotationType(AnnotationTypeData annotationType)

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="true" update="false" cascade="all" unique="true"

setValues

public void setValues(ParameterValueData<?> values)

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)

getInheritingSets

Set<AnnotationSetData> getInheritingSets()
The annotation sets which inherit this annotation. This is the inverse end.

See Also:
AnnotationSetData.getInherited()
Hibernate: set
table="`InheritedAnnotations`" lazy="true"
Hibernate: collection-key
column="`annotation_id`"
Hibernate: collection-many-to-many
column="`annotationset_id`" class="net.sf.basedb.core.data.AnnotationSetData"

setInheritingSets

void setInheritingSets(Set<AnnotationSetData> inheritingSets)

2.17.2: 2011-06-17