uk.ac.ebi.intenz.mapper
Class EnzymeCommentMapper

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

public class EnzymeCommentMapper
extends Object

Maps link information to the corresponding database tables.

Version:
$Revision: 1.3 $ $Date: 2009/05/26 14:59:09 $
Author:
Michael Darsow

Constructor Summary
EnzymeCommentMapper()
           
 
Method Summary
 void deleteAll(Long enzymeId, Connection con)
          Deletes all comments related to an enzyme instance.
 List<EnzymeComment> exportSibComments(Long enzymeId, Connection con)
          Exports all comments which are displayed in the ENZYME view.
 List<EnzymeComment> find(Long enzymeId, Connection con)
          Tries to find comment information about an enzyme.
 void insert(List<EnzymeComment> comments, Long enzymeId, Status status, Connection con)
          Stores the given comment into the database.
 void reload(List<EnzymeComment> comments, Long enzymeId, Status status, Connection con)
           
 void update(EnzymeComment comment, Long enzymeId, Status status, int orderIn, Connection con)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymeCommentMapper

public EnzymeCommentMapper()
Method Detail

find

public List<EnzymeComment> find(Long enzymeId,
                                Connection con)
                         throws SQLException
Tries to find comment information about an enzyme.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
a String representing the comment.
Throws:
SQLException

exportSibComments

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

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

reload

public void reload(List<EnzymeComment> comments,
                   Long enzymeId,
                   Status status,
                   Connection con)
            throws SQLException
Throws:
SQLException

deleteAll

public void deleteAll(Long enzymeId,
                      Connection con)
               throws SQLException
Deletes all comments related to an enzyme instance.

Parameters:
enzymeId - Enzyme ID of the enzyme instance.
con - A database connection.
Throws:
SQLException - if a database error occurs.
NullPointerException - if any of the parameter is null.

insert

public void insert(List<EnzymeComment> comments,
                   Long enzymeId,
                   Status status,
                   Connection con)
            throws SQLException
Stores the given comment into the database.

Parameters:
comments - The enzyme's comment.
enzymeId - The enzyme ID.
status - ...
con - ...
Throws:
SQLException

update

public void update(EnzymeComment comment,
                   Long enzymeId,
                   Status status,
                   int orderIn,
                   Connection con)
            throws SQLException
Throws:
SQLException


Copyright © 2013 EMBL-EBI. All Rights Reserved.