uk.ac.ebi.intenz.mapper
Class EnzymeNameMapper

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

public class EnzymeNameMapper
extends Object

Maps enzyme names information to the corresponding database tables.

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

Constructor Summary
EnzymeNameMapper()
           
 
Method Summary
 void deleteNames(Long enzymeId, EnzymeNameTypeConstant nameType, Connection con)
           
 List<EnzymeName> exportSibNames(Long enzymeId, Connection con)
          Exports all names which are displayed in the ENZYME view.
 List<EnzymeName> find(Long enzymeId, Connection con)
          Tries to find name information about an enzyme.
 List<EnzymeName> findCommonNames(Long enzymeId, Connection con)
          Finds only the common name of an entry.
 EnzymeName findSystematicName(Long enzymeId, Connection con)
          Finds only the systematic name of an entry.
 void insert(EnzymeName enzymeName, Long enzymeId, Status status, int orderIn, Connection con)
           
 void insertNames(List<EnzymeName> names, Long enzymeId, Status status, Connection con)
           
 void reload(List<EnzymeName> names, Long enzymeId, EnzymeNameTypeConstant type, Status status, Connection con)
           
 void update(EnzymeName name, 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

EnzymeNameMapper

public EnzymeNameMapper()
Method Detail

find

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

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

exportSibNames

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

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

findCommonNames

public List<EnzymeName> findCommonNames(Long enzymeId,
                                        Connection con)
                                 throws SQLException
Finds only the common name of an entry.

This method will be used to load a list of ghost entries.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
the name or null if nothing has been found.
Throws:
SQLException

findSystematicName

public EnzymeName findSystematicName(Long enzymeId,
                                     Connection con)
                              throws SQLException
Finds only the systematic name of an entry.

Parameters:
enzymeId - Enzyme ID of entry.
con - The logical connection.
Returns:
the name or null if nothing has been found.
Throws:
SQLException

update

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

insertNames

public void insertNames(List<EnzymeName> names,
                        Long enzymeId,
                        Status status,
                        Connection con)
                 throws SQLException
Throws:
SQLException

insert

public void insert(EnzymeName enzymeName,
                   Long enzymeId,
                   Status status,
                   int orderIn,
                   Connection con)
            throws SQLException
Throws:
SQLException

reload

public void reload(List<EnzymeName> names,
                   Long enzymeId,
                   EnzymeNameTypeConstant type,
                   Status status,
                   Connection con)
            throws SQLException
Throws:
SQLException

deleteNames

public void deleteNames(Long enzymeId,
                        EnzymeNameTypeConstant nameType,
                        Connection con)
                 throws SQLException
Throws:
SQLException


Copyright © 2013 EMBL-EBI. All Rights Reserved.