public interface

ObservationDAO

implements DAO ConceptNameValidator<T>
vars.annotation.ObservationDAO
Known Indirect Subclasses

Class Overview

Created by IntelliJ IDEA. User: brian Date: Aug 7, 2009 Time: 2:33:04 PM To change this template use File | Settings | File Templates.

Summary

Public Methods
abstract List<Observation> findAllByConcept(Concept concept, boolean cascade, ConceptDAO conceptDAO)
Finds all Observations in the database that use this Concept OR a child of this Concept (if cascade = true)
abstract List<Observation> findAllByConceptName(String conceptName)
abstract List<String> findAllConceptNamesUsedInAnnotations()
Retrieves all conceptnames actually used in annotations.
abstract Observation findByPrimaryKey(Object primaryKey)
abstract Observation updateFields(Observation observation)
Updates the fields of an observation in the database.
[Expand]
Inherited Methods
From interface vars.DAO
From interface vars.annotation.ConceptNameValidator

Public Methods

public abstract List<Observation> findAllByConcept (Concept concept, boolean cascade, ConceptDAO conceptDAO)

Finds all Observations in the database that use this Concept OR a child of this Concept (if cascade = true)

Parameters
cascade false = use only the concepts names to locate observations. true = Use the concepts names AND all its descendants names too.
Returns
  • A Set containing all matching observations. If none are found an empty collection is returned

public abstract List<Observation> findAllByConceptName (String conceptName)

public abstract List<String> findAllConceptNamesUsedInAnnotations ()

Retrieves all conceptnames actually used in annotations. This query searches the Observation.conceptName and Association.toConcept fields fields

Returns
  • Set of Strings

public abstract Observation findByPrimaryKey (Object primaryKey)

public abstract Observation updateFields (Observation observation)

Updates the fields of an observation in the database. This is used by the annotation UI since we don't know when the observation was last modified in the database so it's a workaround for concurrent modifications. NOTE: it does not modify the parent VideoFrame or the child Associations; only the fields of the observation.