info.extensiblecatalog.nacm.model.persistence
Class AuthorityRecordDAO

java.lang.Object
  extended by info.extensiblecatalog.nacm.model.persistence.AuthorityRecordDAO

public class AuthorityRecordDAO
extends java.lang.Object

Provides store/find/delete functionality for authority records

Author:
Dean Rzonca

Constructor Summary
AuthorityRecordDAO()
           
 
Method Summary
protected  java.util.List<AuthorityRecord> castList(java.util.List unsafe)
           
 java.util.List<AuthorityRecord> findAllGeneratedRecords()
          Finds all authority records that were generated by the NACM
 java.util.List<AuthorityRecord> findByAlternateName(java.lang.String alternateName)
          Finds authority records by an alternate name
 java.util.List<AuthorityRecord> findByAuthorizedName(java.lang.String authorizedName)
          Finds authority records by their authorized name
 AuthorityRecord findById(java.lang.Long id)
          Finds the authority record with the given ID
 java.util.List<AuthorityRecord> findByRawAlternateName(java.lang.String alternateName)
          Finds authority records by an alternate name
 java.util.List<AuthorityRecord> findByRawAuthorizedName(java.lang.String authorizedName)
          Finds authority records by their authorized name
 void remove(AuthorityRecord toRemove)
          Removes an authority record from the database
 void store(AuthorityRecord recordToStore)
          Stores an authority record in the database If the ID is not set (-1), one will be set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorityRecordDAO

public AuthorityRecordDAO()
Method Detail

store

public void store(AuthorityRecord recordToStore)
Stores an authority record in the database If the ID is not set (-1), one will be set

Parameters:
recordToStore - the bibliographic record to store

remove

public void remove(AuthorityRecord toRemove)
            throws DataAccessException
Removes an authority record from the database

Parameters:
id - the authority record to remove
Throws:
DataAccessException - if no record exists with the given ID

findAllGeneratedRecords

public java.util.List<AuthorityRecord> findAllGeneratedRecords()
Finds all authority records that were generated by the NACM

Returns:
all generated authority records

findByAuthorizedName

public java.util.List<AuthorityRecord> findByAuthorizedName(java.lang.String authorizedName)
Finds authority records by their authorized name

Parameters:
authorizedName - the authorized name in normalized form
Returns:
all authority records with the given authorized name

findByAlternateName

public java.util.List<AuthorityRecord> findByAlternateName(java.lang.String alternateName)
Finds authority records by an alternate name

Parameters:
alternateName - the alternate name, in normalized form
Returns:
all authority records with the given alternate name

findByRawAuthorizedName

public java.util.List<AuthorityRecord> findByRawAuthorizedName(java.lang.String authorizedName)
Finds authority records by their authorized name

Parameters:
authorizedName - the authorized name in un-normalized form
Returns:
all authority records with the given authorized name

findByRawAlternateName

public java.util.List<AuthorityRecord> findByRawAlternateName(java.lang.String alternateName)
Finds authority records by an alternate name

Parameters:
alternateName - the alternate name, in un-normalized form
Returns:
all authority records with the given alternate name

findById

public AuthorityRecord findById(java.lang.Long id)
                         throws DataAccessException
Finds the authority record with the given ID

Parameters:
id - the ID to search for
Returns:
an authority record with the given ID
Throws:
DataAccessException - if no record exists with the given ID

castList

protected java.util.List<AuthorityRecord> castList(java.util.List unsafe)