uk.ac.ebi.intenz.mapper
Class EnzymeClassMapper

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

public class EnzymeClassMapper
extends Object

Maps enzyme class information to the corresponding database tables.

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

Constructor Summary
EnzymeClassMapper()
           
 
Method Summary
 boolean classExists(String ec1, Connection con)
          Checks if the given class number is valid.
 EnzymeClass find(String ec1, Connection con)
          Tries to find Class information about an enzyme.
 List<EnzymeClass> findAll(Connection con)
           
 int findNumberOfClasses(Connection con)
          Finds the number of classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymeClassMapper

public EnzymeClassMapper()
Method Detail

find

public EnzymeClass find(String ec1,
                        Connection con)
                 throws SQLException,
                        DomainException
Tries to find Class information about an enzyme.

Parameters:
ec1 - Number of class to search for.
con - The logical connection.
Returns:
an EnzymeClass instance or null if nothing has been found.
Throws:
NullPointerException - if any of the parameters is null.
SQLException - if a database error occurs.
DomainException - if any error related to domain information occurs (e.g. ec1 is invalid).

findAll

public List<EnzymeClass> findAll(Connection con)
                          throws SQLException,
                                 DomainException
Parameters:
con -
Returns:
A List of all the EnzymeClasses (without subclass information)
Throws:
SQLException
EcException
DomainException

findNumberOfClasses

public int findNumberOfClasses(Connection con)
                        throws SQLException
Finds the number of classes.

Parameters:
con - The logical connection.
Returns:
the number of classes.
Throws:
SQLException

classExists

public boolean classExists(String ec1,
                           Connection con)
                    throws SQLException
Checks if the given class number is valid.

Parameters:
ec1 - The class number.
con - The connection.
Returns:
true if the class exists.
Throws:
SQLException


Copyright © 2013 EMBL-EBI. All Rights Reserved.