uk.ac.ebi.intenz.mapper
Class EnzymeReactionMapper

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

public class EnzymeReactionMapper
extends Object

Maps reaction information to the corresponding database table.
IMPORTANT: after using instances of this class, call the close() method, otherwise the underlying Rhea mapper objects will keep their statements open.

Version:
$Revision: 1.6 $ $Date: 2009/05/26 14:59:09 $
Author:
Michael Darsow, Rafael AlcÔøΩntara

Field Summary
protected  uk.ac.ebi.rhea.mapper.db.RheaDbReader rheaReader
           
 
Constructor Summary
EnzymeReactionMapper()
           
 
Method Summary
 void close()
           
 EnzymaticReactions exportSibReactions(Long enzymeId, Connection con)
          Exports all reactions which are displayed in the ENZYME view.
protected  void finalize()
           
 EnzymaticReactions find(Long enzymeId, Connection con)
          Tries to find reaction information about an enzyme.
 void insert(EnzymaticReactions reactions, Long enzymeId, Connection con)
          Stores the given list of reactions into the database.
 void insertMapping(Long enzymeId, Long reactionId, EnzymeViewConstant view, boolean iubmb, int orderIn, Connection con)
          Inserts a mapping reaction-enzyme into the database.
 void update(Long enzymeId, EnzymaticReactions reactions, Connection con)
          Replace the reactions in the database related to one enzyme with those passed as parameter.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rheaReader

protected uk.ac.ebi.rhea.mapper.db.RheaDbReader rheaReader
Constructor Detail

EnzymeReactionMapper

public EnzymeReactionMapper()
Method Detail

find

public EnzymaticReactions find(Long enzymeId,
                               Connection con)
                        throws SQLException,
                               uk.ac.ebi.rhea.mapper.MapperException
Tries to find reaction information about an enzyme.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
a EnzymaticReactions object containing Reactioninstances or null if nothing has been found.
Throws:
SQLException - in case of a generic database problem.
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving Rhea reactions.

exportSibReactions

public EnzymaticReactions exportSibReactions(Long enzymeId,
                                             Connection con)
                                      throws SQLException,
                                             uk.ac.ebi.rhea.mapper.MapperException
Exports all reactions which are displayed in the ENZYME view. Affected table rows will be locked.

Parameters:
enzymeId - The enzyme ID used to retreive the related reactions.
con - The database connection.
Returns:
an EnzymaticReactions containing reactions or null if no reaction could be found.
Throws:
SQLException - if a generic database error occured.
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving Rhea reactions.
NullPointerException - if either of the parameters is null.

insert

public void insert(EnzymaticReactions reactions,
                   Long enzymeId,
                   Connection con)
            throws SQLException
Stores the given list of reactions into the database.

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

insertMapping

public void insertMapping(Long enzymeId,
                          Long reactionId,
                          EnzymeViewConstant view,
                          boolean iubmb,
                          int orderIn,
                          Connection con)
                   throws SQLException
Inserts a mapping reaction-enzyme into the database.

Parameters:
enzymeId -
reactionId -
view -
iubmb -
orderIn -
con -
Throws:
SQLException

update

public void update(Long enzymeId,
                   EnzymaticReactions reactions,
                   Connection con)
            throws SQLException
Replace the reactions in the database related to one enzyme with those passed as parameter.

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

close

public void close()
           throws uk.ac.ebi.rhea.mapper.MapperException
Throws:
uk.ac.ebi.rhea.mapper.MapperException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2013 EMBL-EBI. All Rights Reserved.