public class

VideoArchiveDAOImpl

extends DAO
implements VideoArchiveDAO
java.lang.Object
   ↳ vars.jpa.DAO
     ↳ vars.annotation.jpa.VideoArchiveDAOImpl

Class Overview

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

Summary

[Expand]
Inherited Fields
From class vars.jpa.DAO
Public Constructors
VideoArchiveDAOImpl(EntityManager entityManager, AnnotationFactory annotationFactory)
Public Methods
VideoArchive deleteEmptyVideoFrames(VideoArchive videoArchive)
This should be called within a DAO transaction
Set<String> findAllLinkValues(VideoArchive videoArchive, String linkName)
Return all reference numbers in the current videoArchive.
Set<String> findAllLinkValues(VideoArchive videoArchive, String linkName, Concept concept)
This should only be called within JPA/DAO transaction
VideoArchive findByName(String name)
Lookup a @link{IVideoArchive} by name.
VideoArchive findByPrimaryKey(Object primaryKey)
VideoArchive findOrCreateByParameters(String platform, int sequenceNumber, String videoArchiveName)
Call this within a transaction.
[Expand]
Inherited Methods
From class vars.jpa.DAO
From class java.lang.Object
From interface vars.DAO
From interface vars.annotation.VideoArchiveDAO
From interface vars.jpa.EntityManagerAspect

Public Constructors

public VideoArchiveDAOImpl (EntityManager entityManager, AnnotationFactory annotationFactory)

Public Methods

public VideoArchive deleteEmptyVideoFrames (VideoArchive videoArchive)

This should be called within a DAO transaction

Returns
  • The updated VideoArchive

public Set<String> findAllLinkValues (VideoArchive videoArchive, String linkName)

Return all reference numbers in the current videoArchive. The reference number is found in Association with the 'linkName | toConcept | linkValue' of 'identity-reference | self | [integer]' where integer is a value egual to or greater than 0. This is used so that the UI can list the existing reference numbers for users to select from.

Parameters
videoArchive The videoArchive of interest. This find will search all annotation in this video archive
linkName The linkValue in the associations to search for
Returns
  • A collection of String objects

public Set<String> findAllLinkValues (VideoArchive videoArchive, String linkName, Concept concept)

This should only be called within JPA/DAO transaction

Parameters
videoArchive The videoArchive of interest. This find will search all annotation in this video archive
linkName The name of links to match
concept If not null then only the linkvalues found for associations to this concept are returned
Returns
  • A collection (SortedSet) of String objects

public VideoArchive findByName (String name)

Lookup a @link{IVideoArchive} by name.

Returns
  • The matching object. null is returned if no match exists

public VideoArchive findByPrimaryKey (Object primaryKey)

public VideoArchive findOrCreateByParameters (String platform, int sequenceNumber, String videoArchiveName)

Call this within a transaction. The returned VideoArchive will be in the database