org.archiviststoolkit.mydomain
Class DigitalObjectDAO

java.lang.Object
  extended by org.archiviststoolkit.mydomain.DomainAccessObjectImpl
      extended by org.archiviststoolkit.mydomain.DigitalObjectDAO
All Implemented Interfaces:
java.util.EventListener, DomainAccessListener, DomainAccessObject

public class DigitalObjectDAO
extends DomainAccessObjectImpl


Field Summary
static int a
           
 
Constructor Summary
DigitalObjectDAO()
          Constructor which builds a DAO for this class.
 
Method Summary
 java.util.Collection findAll(org.hibernate.LockMode lockmode, java.lang.String... sortFields)
          Method that finds all the parent digital objects
 java.util.Collection findAllCommon(org.hibernate.LockMode lockmode, org.hibernate.Session session, boolean closeSession, org.hibernate.criterion.Criterion criterion, java.lang.String... sortFields)
          Method finds all parent digital object and accepts an additional criterion for searching
 java.util.Collection findAllLongSession(org.hibernate.LockMode lockmode, java.lang.String... sortFields)
          Method that finds all the parent digital objects using a long session
 java.util.Collection findAllUnlinked(org.hibernate.LockMode lockmode, java.lang.String... sortFields)
          Method that finds all parent digital objects that are not linked to any resource record
 DigitalObjects findByMetsIdentifier(DigitalObjects digitalObject)
          Method to find a parent digital object by the METS identifier
 DigitalObjects findByMetsIdentifierCommon(DigitalObjects digitalObject, boolean closeSession, org.hibernate.Session session)
          Method to find a parent digital object by the METS identifier
 DigitalObjects findByMetsIdentifierLongSession(DigitalObjects digitalObject)
          Method to find a parent digital object by the METS identifier using a long seesion
 Resources findResourceByDigitalObject(ArchDescriptionDigitalInstances instance)
           
 java.util.List lookupDigitalObjectByParent(DigitalObjects digitalObject)
           
 java.util.List lookupDigitalObjectByParent(DigitalObjects digitalObject, org.hibernate.Session session)
           
 void updateFromDrop(java.lang.Long resourceComponentId, java.lang.Long resourceParentId, java.lang.Long resourceComponentParentId, java.lang.Double componentOrder)
           
 
Methods inherited from class org.archiviststoolkit.mydomain.DomainAccessObjectImpl
add, addGroup, addListener, closeLongSession, closeLongSessionRollback, delete, deleteById, deleteGroup, deleteLongSession, deleteLongSession, domainChanged, findAll, findAllLongSession, findAllLongSession, findByExample, findByNamedQuery, findByNamedQuery, findByPrimaryKey, findByPrimaryKeyLongSession, findByPrimaryKeyLongSessionForPrinting, findByPropertyValue, findByPropertyValues, findByPropertyValuesLongSession, findByQuery, findByQueryEditor, findByQueryEditorLongSession, findByUniquePropertyValue, findByUniquePropertyValueLongSession, getCountBasedOnPropertyValue, getHumanReadableSearchString, getLongSession, getPersistentClass, merge, notifyListeners, removeListener, setHumanReadableSearchString, update, updateLongSession, updateLongSession, updateTextField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

public static int a
Constructor Detail

DigitalObjectDAO

public DigitalObjectDAO()
Constructor which builds a DAO for this class.

Method Detail

lookupDigitalObjectByParent

public java.util.List lookupDigitalObjectByParent(DigitalObjects digitalObject)

lookupDigitalObjectByParent

public java.util.List lookupDigitalObjectByParent(DigitalObjects digitalObject,
                                                  org.hibernate.Session session)

updateFromDrop

public void updateFromDrop(java.lang.Long resourceComponentId,
                           java.lang.Long resourceParentId,
                           java.lang.Long resourceComponentParentId,
                           java.lang.Double componentOrder)

findResourceByDigitalObject

public Resources findResourceByDigitalObject(ArchDescriptionDigitalInstances instance)

findByMetsIdentifier

public DigitalObjects findByMetsIdentifier(DigitalObjects digitalObject)
                                    throws LookupException
Method to find a parent digital object by the METS identifier

Parameters:
digitalObject - The digital object whose identifer to use to do the look up
Returns:
The Digital Object that was found or null otherwise
Throws:
LookupException - Throws this exception is there was a problem finding the digital object

findByMetsIdentifierLongSession

public DigitalObjects findByMetsIdentifierLongSession(DigitalObjects digitalObject)
                                               throws LookupException
Method to find a parent digital object by the METS identifier using a long seesion

Parameters:
digitalObject - The digital object whose identifer to use to do the look up
Returns:
The Digital Object that was found or null otherwise
Throws:
LookupException - Throws this exception is there was a problem finding the digital object

findByMetsIdentifierCommon

public DigitalObjects findByMetsIdentifierCommon(DigitalObjects digitalObject,
                                                 boolean closeSession,
                                                 org.hibernate.Session session)
                                          throws LookupException
Method to find a parent digital object by the METS identifier

Parameters:
digitalObject - The digital object whose identifer to use to do the look up
session - The session to use to find the digital object
closeSession - Whether to close the session after using it
Returns:
The Digital Object that was found or null otherwise
Throws:
LookupException - Throws this exception is there was a problem finding the digital object

findAll

public java.util.Collection findAll(org.hibernate.LockMode lockmode,
                                    java.lang.String... sortFields)
                             throws LookupException
Method that finds all the parent digital objects

Specified by:
findAll in interface DomainAccessObject
Overrides:
findAll in class DomainAccessObjectImpl
Parameters:
lockmode - The lock mode to use
sortFields - fields to sort by
Returns:
A collection of parent objects found
Throws:
LookupException - If there is a problem finding the digital objects

findAllLongSession

public java.util.Collection findAllLongSession(org.hibernate.LockMode lockmode,
                                               java.lang.String... sortFields)
                                        throws LookupException
Method that finds all the parent digital objects using a long session

Parameters:
lockmode -
sortFields -
Returns:
Collection containing the parent digital objects that were found
Throws:
LookupException

findAllUnlinked

public java.util.Collection findAllUnlinked(org.hibernate.LockMode lockmode,
                                            java.lang.String... sortFields)
                                     throws LookupException
Method that finds all parent digital objects that are not linked to any resource record

Parameters:
lockmode -
sortFields -
Returns:
Collection containing the parent digital objects that were found
Throws:
LookupException

findAllCommon

public java.util.Collection findAllCommon(org.hibernate.LockMode lockmode,
                                          org.hibernate.Session session,
                                          boolean closeSession,
                                          org.hibernate.criterion.Criterion criterion,
                                          java.lang.String... sortFields)
                                   throws LookupException
Method finds all parent digital object and accepts an additional criterion for searching

Parameters:
lockmode - The lock mode
session - The session
closeSession - Whether to close the session after seaching is done
criterion - the additional criterion to add
sortFields - te field to sort by
Returns:
A collection of parent digital objects
Throws:
LookupException