uk.ac.ebi.intenz.mapper
Class EnzymeSubSubclassMapper

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

public class EnzymeSubSubclassMapper
extends Object

Maps enzyme Sub-subclass information to the corresponding database tables.

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

Constructor Summary
EnzymeSubSubclassMapper()
           
 
Method Summary
 EnzymeSubSubclass find(int ec1, int ec2, int ec3, Connection con)
          Tries to find Sub-subclass information about an enzyme.
 List<EnzymeSubSubclass> findAll(Connection con)
           
 List<EnzymeSubSubclass> findList(String ec1, String ec2, Connection con)
          Tries to find all Sub-subclasses requested.
 void insertSubSubclass(EnzymeCommissionNumber ec, String name, String description, Connection con)
          Creates a new row in the SUBSUBCLASSES table.
 boolean subSubclassExists(String ec1, String ec2, String ec3, Connection con)
          Checks if the given sub-subclass numbers are valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnzymeSubSubclassMapper

public EnzymeSubSubclassMapper()
Method Detail

find

public EnzymeSubSubclass find(int ec1,
                              int ec2,
                              int ec3,
                              Connection con)
                       throws SQLException,
                              DomainException
Tries to find Sub-subclass information about an enzyme.

Parameters:
ec1 - Number of class to search for.
ec2 - Number of subclass to search for.
ec3 - Number of sub-subclass 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.

findList

public List<EnzymeSubSubclass> findList(String ec1,
                                        String ec2,
                                        Connection con)
                                 throws SQLException,
                                        DomainException
Tries to find all Sub-subclasses requested.

Parameters:
ec1 - Number/Wildcard of class to search for.
ec2 - Number/Wildcard of subclass to search for.
con - The logical connection.
Returns:
a Vector of SubSubClass instances or null if nothing has been found.
Throws:
SQLException
DomainException

findAll

public List<EnzymeSubSubclass> findAll(Connection con)
                                throws SQLException,
                                       DomainException
Throws:
SQLException
DomainException

insertSubSubclass

public void insertSubSubclass(EnzymeCommissionNumber ec,
                              String name,
                              String description,
                              Connection con)
                       throws SQLException
Creates a new row in the SUBSUBCLASSES table.

Parameters:
ec - EC number of this sub-subclass.
name - The name of the sub-subclass.
description - The description of the sub-subclass.
con - The database connection.
Throws:
SQLException - if a database error occurs.
NullPointerException - if any of the parameters is null.

subSubclassExists

public boolean subSubclassExists(String ec1,
                                 String ec2,
                                 String ec3,
                                 Connection con)
                          throws SQLException
Checks if the given sub-subclass numbers are valid.

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


Copyright © 2013 EMBL-EBI. All Rights Reserved.