uk.ac.ebi.intenz.mapper
Class EnzymeLinkMapper

java.lang.Object
  extended by uk.ac.ebi.intenz.mapper.EnzymeLinkMapper

public class EnzymeLinkMapper
extends Object

Maps link information to the corresponding database tables.

Version:
$Revision: 1.3 $ $Date: 2009/05/26 14:23:11 $
Author:
Michael Darsow

Constructor Summary
EnzymeLinkMapper()
           
 
Method Summary
 void delete(Long enzymeId, EnzymeLink link, Connection con)
           
 void deleteAll(Long enzymeId, Connection con)
           
 void deleteAllXref(Long enzymeId, Connection con)
           
 void deleteByCodeXref(Long enzymeId, String xrefCode, Connection con)
           
 void deleteByName(Long enzymeId, String displayName, Connection con)
           
 void deleteOtherLinks(List<EnzymeLink> links, Long enzymeId, Connection con)
           
 void deleteXref(Long enzymeId, EnzymeLink xref, Connection con)
           
 List<EnzymeLink> exportSibLinks(Long enzymeId, Connection con)
          Exports all links which are displayed in the ENZYME view.
 List<EnzymeLink> find(Long enzymeId, Connection con)
          Tries to find link information about an enzyme in tables LINKS and XREFS.
 List<EnzymeLink> findSibXrefs(Long enzymeId, Connection con)
          Finds all xrefs which are displayed in the ENZYME view.
 List<EnzymeLink> findXrefs(Long enzymeId, Connection con)
          Tries to find SwissProt xref information about an enzyme.
 void insert(List<EnzymeLink> links, Long enzymeId, Status status, Connection con)
          Stores the given list of links into the database.
 void insertLink(EnzymeLink link, Long enzymeId, Status status, Connection con)
           
 void reloadLinks(List<EnzymeLink> links, Long enzymeId, Status status, Connection con)
           
 void updateLinkUrl(EnzymeLink link, Long enzymeId, Status status, Connection con)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymeLinkMapper

public EnzymeLinkMapper()
Method Detail

find

public List<EnzymeLink> find(Long enzymeId,
                             Connection con)
                      throws SQLException,
                             DomainException
Tries to find link information about an enzyme in tables LINKS and XREFS.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
a Vector containing EnzymeLinkinstances or null if nothing has been found.
Throws:
SQLException
DomainException

exportSibLinks

public List<EnzymeLink> exportSibLinks(Long enzymeId,
                                       Connection con)
                                throws SQLException,
                                       DomainException
Exports all links which are displayed in the ENZYME view. Affected table rows will be locked.

Parameters:
enzymeId - The enzyme ID used to retreive the related links.
con - The database connection.
Returns:
an ArrayList of links or null if no link could be found.
Throws:
SQLException - if a database error occured.
NullPointerException - if either of the parameters is null.
DomainException

findXrefs

public List<EnzymeLink> findXrefs(Long enzymeId,
                                  Connection con)
                           throws SQLException,
                                  DomainException
Tries to find SwissProt xref information about an enzyme.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
a Vector containing EnzymeLinkinstances or null if nothing has been found.
Throws:
SQLException
DomainException

findSibXrefs

public List<EnzymeLink> findSibXrefs(Long enzymeId,
                                     Connection con)
                              throws SQLException,
                                     DomainException
Finds all xrefs which are displayed in the ENZYME view.

Parameters:
enzymeId - The enzyme ID used to retreive the related xrefs.
con - The database connection.
Returns:
an ArrayList of xrefs or null if no xref could be found.
Throws:
SQLException - if a database error occured.
NullPointerException - if either of the parameters is null.
DomainException

insert

public void insert(List<EnzymeLink> links,
                   Long enzymeId,
                   Status status,
                   Connection con)
            throws SQLException
Stores the given list of links into the database.

Parameters:
links - The vector of links.
enzymeId - The enzyme ID.
status - ...
con - ...
Throws:
SQLException

insertLink

public void insertLink(EnzymeLink link,
                       Long enzymeId,
                       Status status,
                       Connection con)
                throws SQLException
Throws:
SQLException

updateLinkUrl

public void updateLinkUrl(EnzymeLink link,
                          Long enzymeId,
                          Status status,
                          Connection con)
                   throws SQLException
Throws:
SQLException

reloadLinks

public void reloadLinks(List<EnzymeLink> links,
                        Long enzymeId,
                        Status status,
                        Connection con)
                 throws SQLException
Throws:
SQLException

delete

public void delete(Long enzymeId,
                   EnzymeLink link,
                   Connection con)
            throws SQLException
Throws:
SQLException

deleteAll

public void deleteAll(Long enzymeId,
                      Connection con)
               throws SQLException
Throws:
SQLException

deleteXref

public void deleteXref(Long enzymeId,
                       EnzymeLink xref,
                       Connection con)
                throws SQLException
Throws:
SQLException

deleteAllXref

public void deleteAllXref(Long enzymeId,
                          Connection con)
                   throws SQLException
Throws:
SQLException

deleteByName

public void deleteByName(Long enzymeId,
                         String displayName,
                         Connection con)
                  throws SQLException
Throws:
SQLException

deleteByCodeXref

public void deleteByCodeXref(Long enzymeId,
                             String xrefCode,
                             Connection con)
                      throws SQLException
Throws:
SQLException

deleteOtherLinks

public void deleteOtherLinks(List<EnzymeLink> links,
                             Long enzymeId,
                             Connection con)
                      throws SQLException
Throws:
SQLException


Copyright © 2013 EMBL-EBI. All Rights Reserved.