| 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 Methods  | 
   
From class
  vars.jpa.DAO
  
   
  
    
    
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        close()
        
         Closes the associated entityManger if it's open. 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        commit()
        
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        endTransaction()
        
         Close any open transaction used on the current thread. 
  
   |  
	 
    
        | 
            
            
            
            
            
            boolean
         | 
        
        equalInDatastore(Object thisObj, Object thatObj)
        
         True if the to objects represent the same object in the datastore. 
  
   |  
	 
    
        | 
            
            
            
            
            <T>
            T
         | 
        
        find(T object)
        
         Retrieves the object from the datastore. 
  
   |  
	 
    
        | 
            
            
            
            
            
            List
         | 
        
        findByNamedQuery(String name)
        
         Executes a named query that does not take any parameters 
  
   |  
	 
    
        | 
            
            
            
            
            
            List
         | 
        
        findByNamedQuery(String name, Map<String, Object> namedParameters)
        
         Executes a named query using a map of named parameters 
  
   |  
	 
    
        | 
            
            
            
            
            <T>
            T
         | 
        
        findByPrimaryKey(Class<T> clazz, Object primaryKey)
        
   |  
	 
    
        | 
            
            
            
            
            
            EntityManager
         | 
        
        getEntityManager()
        
   |  
	 
    
        | 
            
            
            
            
            
            boolean
         | 
        
        isPersistent(Object entity)
        
         Checks to see if the given object is persisted in the database 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        loadLazyRelations(Object entity)
        
         Many one-to-many relations are lazy loaded in JPA. 
  
   |  
	 
    
        | 
            
            
            
            
            <T>
            T
         | 
        
        merge(T entity)
        
         Update an object in the database and bring it into the current transaction 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        persist(Object entity)
        
         Insert an object into the database 
  
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        remove(Object entity)
        
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        startTransaction()
        
         Start a database transaction. 
  
   |  
	 
    
        | 
            
            
            
            static
            
            Map<String, Object>
         | 
        
        toParameterMap(Object... args)
        
         The findByNamedQuery method needs a Map of parameters. 
  
   |  
 
   
 
 | 
   
From class
  java.lang.Object
  
   
  
    
    
	 
    
        | 
            
            
            
            
            
            Object
         | 
        
        clone()
        
   |  
	 
    
        | 
            
            
            
            
            
            boolean
         | 
        
        equals(Object arg0)
        
   |  
	 
    
        | 
            
            
            
            
            
            void
         | 
        
        finalize()
        
   |  
	 
    
        | 
            
            
            final
            
            
            Class<?>
         | 
        
        getClass()
        
   |  
	 
    
        | 
            
            
            
            
            
            int
         | 
        
        hashCode()
        
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        notify()
        
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        notifyAll()
        
   |  
	 
    
        | 
            
            
            
            
            
            String
         | 
        
        toString()
        
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait()
        
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait(long arg0)
        
   |  
	 
    
        | 
            
            
            final
            
            
            void
         | 
        
        wait(long arg0, int arg1)
        
   |  
 
   
 
 | 
   
From interface
  vars.DAO
  
   
  
    
    
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        close()
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        commit()
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        endTransaction()
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            boolean
         | 
        
        equalInDatastore(Object thisObj, Object thatObj)
        
         True if the to objects represent the same object in the datastore. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            <T>
            T
         | 
        
        find(T object)
        
         Retrieves the object from the datastore. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            List
         | 
        
        findByNamedQuery(String name)
        
         Executes a named query that does not take any parameters 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            List
         | 
        
        findByNamedQuery(String name, Map<String, Object> namedParameters)
        
         Executes a named query using a map of named parameters 
  
   |  
	 
    
        | 
            abstract
            
            
            
            <T>
            T
         | 
        
        findByPrimaryKey(Class<T> clazz, Object primaryKey)
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            EntityManager
         | 
        
        getEntityManager()
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            boolean
         | 
        
        isPersistent(Object entity)
        
         Checks to see if the given object is persisted in the databas 
  
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        loadLazyRelations(Object entity)
        
         Many one-to-many relations are lazy loaded in JPA. 
  
   |  
	 
    
        | 
            abstract
            
            
            
            <T>
            T
         | 
        
        merge(T object)
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        persist(Object object)
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        remove(Object object)
        
   |  
	 
    
        | 
            abstract
            
            
            
            
            void
         | 
        
        startTransaction()
        
   |  
 
   
 
 | 
   
From interface
  vars.annotation.VideoArchiveDAO
 | 
   
From interface
  vars.jpa.EntityManagerAspect
 | 
 
Public Constructors
 
    
      
        public 
         
         
         
         
        
      
      VideoArchiveDAOImpl
      (EntityManager entityManager, AnnotationFactory annotationFactory)
    
      
    
 
Public Methods
 
    
      
    
      
  This should be called within a DAO transaction
 
  
     
 
 
    
      
        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
      
      findOrCreateByParameters
      (String platform, int sequenceNumber, String videoArchiveName)
    
      
    
      
  Call this within a transaction. The returned VideoArchive will be 
 in the database