public class

ObservationDAOImpl

extends DAO
implements ObservationDAO
java.lang.Object
   ↳ vars.jpa.DAO
     ↳ vars.annotation.jpa.ObservationDAOImpl

Class Overview

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

Summary

[Expand]
Inherited Fields
From class vars.jpa.DAO
Public Constructors
ObservationDAOImpl(EntityManager entityManager)
Public Methods
List<Observation> findAllByConcept(Concept concept, boolean cascade, ConceptDAO conceptDAO)
This should be called within a JPA transaction
List<Observation> findAllByConceptName(String conceptName)
List<Observation> findAllByConcept_(Concept concept, boolean cascade, ConceptDAO conceptDAO)
This method is deprecated. No replacement.
List<String> findAllConceptNamesUsedInAnnotations()
This should be called within a JPA transaction
Observation findByPrimaryKey(Object primaryKey)
Observation updateFields(Observation observation)
Updates the fields of an observation in the database.
void validateName(Observation object, ConceptDAO conceptDAO)
[Expand]
Inherited Methods
From class vars.jpa.DAO
From class java.lang.Object
From interface vars.DAO
From interface vars.annotation.ConceptNameValidator
From interface vars.annotation.ObservationDAO
From interface vars.jpa.EntityManagerAspect

Public Constructors

public ObservationDAOImpl (EntityManager entityManager)

Public Methods

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

This should be called within a JPA transaction

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 List<Observation> findAllByConceptName (String conceptName)

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

This method is deprecated.
No replacement.

This should be called within a JPA transaction@return

public List<String> findAllConceptNamesUsedInAnnotations ()

This should be called within a JPA transaction

Returns
  • Set of Strings

public Observation findByPrimaryKey (Object primaryKey)

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

public void validateName (Observation object, ConceptDAO conceptDAO)