public class EnzymeEntryMapper extends Object
close() method, otherwise the underlying Rhea mapper objects will
keep their statements open.| Constructor and Description |
|---|
EnzymeEntryMapper() |
EnzymeEntryMapper(EnzymeReactionMapper enzymeReactionMapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cloneExists(Long id,
Connection con)
Checks if a clone of an enzyme already exists.
|
void |
close() |
static boolean |
ecExists(uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec,
Connection con)
Checks whether a given EC number already exists in the database.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
exportAllEntries(Connection con)
Exports every piece of data for publicly available entries.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
exportApprovedSibEntries(Connection con)
Tries to export all approved entries containing only ENZYME relevant information.
|
protected void |
finalize() |
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findAll(Connection con)
Tries to find all public entries but loads the entries only with minimum
information.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findAllByEc(int ec1,
int ec2,
int ec3,
int ec4,
Boolean preliminary,
Connection con) |
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findAllByEc(int ec1,
int ec2,
int ec3,
int ec4,
Connection con)
Tries to find entry information about all enzymes specified by the given EC.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findAllSubSubclassEntriesByEc(int ec1,
int ec2,
int ec3,
Connection con) |
uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry |
findByEc(int ec1,
int ec2,
int ec3,
int ec4,
uk.ac.ebi.intenz.domain.constants.Status status,
Connection con)
Tries to find entry information about an enzyme.
|
uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry |
findByEc(String ecString,
uk.ac.ebi.intenz.domain.constants.Status status,
Connection con)
Finds an enzyme by EC number (as String) and status.
|
uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry |
findById(long id,
Connection con)
Loads a complete version of the enzyme with the given ID.
|
uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry |
findById(Long id,
Connection con,
boolean ghost)
Tries to find entry information about an enzyme.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findByStatus(Connection con,
uk.ac.ebi.intenz.domain.constants.Status status)
Retrieves the list of enzymes with a given status.
|
uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber |
findEC(String id,
Connection con)
Returns the EC number of the given enzyme ID.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findFullProposedList(Connection con)
Tries to find all proposed entries with all information.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findFullSuggestedList(Connection con)
Tries to find all suggested entries with all information.
|
uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry |
findGhostById(int id,
Connection con)
Loads a ghost version of the enzyme with the given ID.
|
String |
findHistoryLine(Long id,
Connection con)
Returns the history line of the enzyme with the given ID.
|
Long |
findIDInMappingTable(String ec,
uk.ac.ebi.intenz.domain.constants.Status status,
Connection con) |
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findList(String ec1,
String ec2,
String ec3,
Connection con)
Tries to find all entries requested but loads the entries only with
minimum information.
|
Long |
findNextEnzymeId(Connection con)
Returns the next available enzyme ID.
|
String |
findNote(Long id,
Connection con)
Returns the note of the enzyme with the given ID.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findPreliminaryEcsList(Connection con)
Gets the list of preliminary EC numbers issued by UniProt.
|
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findProposedList(Connection con)
Tries to find all proposed entries but loads the entries only with
minimum information.
|
uk.ac.ebi.intenz.domain.stats.EnzymeStatistics |
findStats(Connection con) |
List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> |
findSuggestedList(Connection con)
Tries to find all suggested entries but loads the entries only with
minimum information.
|
void |
insert(Long enzymeId,
uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec,
uk.ac.ebi.intenz.domain.constants.Status status,
uk.ac.ebi.intenz.domain.constants.EnzymeSourceConstant source,
String note,
String historyLine,
boolean isActive,
Connection con)
Inserts the core data of a new enzyme entry.
|
void |
update(Long enzymeId,
uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec,
uk.ac.ebi.intenz.domain.constants.Status status,
uk.ac.ebi.intenz.domain.constants.EnzymeSourceConstant source,
String note,
String historyLine,
boolean active,
Connection con)
Updates the core data of an enzyme stored in the table
ENZYMES. |
void |
updateEc(Long enzymeId,
uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber newEc,
Connection con)
Updates the EC of the given enzyme.
|
void |
updateHistoryLine(Long enzymeId,
String historyLine,
Connection con)
Updates the history line of the given enzyme.
|
void |
updateNote(Long enzymeId,
String note,
Connection con)
Updates the notes of the given enzyme.
|
void |
updateStatus(Long enzymeId,
uk.ac.ebi.intenz.domain.constants.Status status,
Connection con)
Updates the status of the given enzyme.
|
public EnzymeEntryMapper()
public EnzymeEntryMapper(EnzymeReactionMapper enzymeReactionMapper)
protected void finalize()
throws Throwable
public void close()
public uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry findByEc(int ec1,
int ec2,
int ec3,
int ec4,
uk.ac.ebi.intenz.domain.constants.Status status,
Connection con)
throws SQLException,
uk.ac.ebi.intenz.domain.exceptions.DomainException,
uk.ac.ebi.rhea.mapper.MapperException
ec1 - Number of class to search for.ec2 - Number of subclass to search for.ec3 - Number of sub-subclass to search for.ec4 - Number of entry to search for.status - the status of the searched enzyme.
If null, it defaults to Status.APPROVED.con - The logical connection.EnzymeEntry instance or null if
nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry findByEc(String ecString, uk.ac.ebi.intenz.domain.constants.Status status, Connection con) throws NumberFormatException, SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
ecString - the EC number.status - the enzyme status.con - a database connection.null if not found.NumberFormatExceptionSQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findAllByEc(int ec1, int ec2, int ec3, int ec4, Boolean preliminary, Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findAllByEc(int ec1, int ec2, int ec3, int ec4, Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
ec1 - Number of class to search for.ec2 - Number of subclass to search for.ec3 - Number of sub-subclass to search for.ec4 - Number of entry to search for.con - The logical connection.EnzymeEntry instance or null
if nothing has been found.NullPointerException - if parameter con is null.SQLException - if a database error occurs.uk.ac.ebi.intenz.domain.exceptions.DomainException - if any error related to domain information occurs.public List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findAllSubSubclassEntriesByEc(int ec1, int ec2, int ec3, Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry findById(Long id, Connection con, boolean ghost) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
id - The enzyme ID.con - The logical connection.ghost - return a ghost (minimal info)?EnzymeEntry instance
or null if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor
info for non-ghosts.public uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry findById(long id,
Connection con)
throws SQLException,
uk.ac.ebi.intenz.domain.exceptions.DomainException,
uk.ac.ebi.rhea.mapper.MapperException
id - con - EnzymeEntry instance
or null if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry findGhostById(int id,
Connection con)
throws SQLException,
uk.ac.ebi.intenz.domain.exceptions.DomainException
id - The enzyme ID.con - The logical connection.EnzymeEntry instance or null if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic Long findIDInMappingTable(String ec, uk.ac.ebi.intenz.domain.constants.Status status, Connection con) throws SQLException
SQLExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findAll(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
con - The logical connection.List of EnzymeEntry instances
or null if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findList(String ec1, String ec2, String ec3, Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
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.List of EnzymeEntry instances or null
if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findByStatus(Connection con, uk.ac.ebi.intenz.domain.constants.Status status) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
con - status - SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findProposedList(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
con - The logical connection.List of
EnzymeEntry instances.SQLException - if a database error occurs.uk.ac.ebi.intenz.domain.exceptions.DomainException - if a domain related error occurs.public List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findSuggestedList(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
con - The logical connection.Vector of EnzymeEntry instances
or null if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findPreliminaryEcsList(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
con - SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> exportAllEntries(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
con - List of EnzymeEntrysSQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> exportApprovedSibEntries(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.ArrayList of EnzymeEntry instances or null
if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findFullProposedList(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.Vector of EnzymeEntry instances or null
if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public List<uk.ac.ebi.intenz.domain.enzyme.EnzymeEntry> findFullSuggestedList(Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException, uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.Vector of EnzymeEntry instances or null
if nothing has been found.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionuk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.public uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber findEC(String id, Connection con) throws SQLException, uk.ac.ebi.intenz.domain.exceptions.DomainException
id - The enzyme ID.con - The logical connection.null.SQLExceptionuk.ac.ebi.intenz.domain.exceptions.DomainExceptionpublic static boolean ecExists(uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec,
Connection con)
throws SQLException
ec - The EC number to be checked.con - The database connection.true if the given EC number exists in the database.SQLException - if a database error occurs.NullPointerException - if any of the parameters is nullpublic String findHistoryLine(Long id, Connection con) throws SQLException
id - The enzyme ID.con - The logical connection.null.SQLExceptionpublic String findNote(Long id, Connection con) throws SQLException
id - The enzyme ID.con - The logical connection.null.SQLExceptionpublic uk.ac.ebi.intenz.domain.stats.EnzymeStatistics findStats(Connection con) throws SQLException
con - The logical connection.SQLExceptionpublic void insert(Long enzymeId, uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec, uk.ac.ebi.intenz.domain.constants.Status status, uk.ac.ebi.intenz.domain.constants.EnzymeSourceConstant source, String note, String historyLine, boolean isActive, Connection con) throws SQLException
findNextEnzymeId(java.sql.Connection)enzymeId - ec - status - source - isActive - note - historyLine - con - SQLExceptionpublic void update(Long enzymeId, uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber ec, uk.ac.ebi.intenz.domain.constants.Status status, uk.ac.ebi.intenz.domain.constants.EnzymeSourceConstant source, String note, String historyLine, boolean active, Connection con) throws SQLException
ENZYMES.
NOTE: The ACTIVE column of this table is cannot be updated
using this method since this column
is managed by the event package.enzymeId - The enzyme's ID.ec - The EC number.status - The current status of the enzyme.source - The source of this enzyme.note - A note the curator might have added.historyLine - The enzyme's history line.active - The enzyme's active status.con - A database connection.SQLExceptionpublic void updateEc(Long enzymeId, uk.ac.ebi.intenz.domain.enzyme.EnzymeCommissionNumber newEc, Connection con) throws SQLException
enzymeId - The enzyme's ID.newEc - The new EC.con - The logical connection.SQLExceptionpublic void updateNote(Long enzymeId, String note, Connection con) throws SQLException
enzymeId - The enzyme's ID.note - The note.con - The logical connection.SQLExceptionpublic void updateStatus(Long enzymeId, uk.ac.ebi.intenz.domain.constants.Status status, Connection con) throws SQLException
enzymeId - The enzyme's ID.status - The status.con - The logical connection.SQLExceptionpublic void updateHistoryLine(Long enzymeId, String historyLine, Connection con) throws SQLException
enzymeId - The enzyme's ID.historyLine - The new history line.con - The logical connection.SQLExceptionpublic boolean cloneExists(Long id, Connection con) throws SQLException
id - The enzyme ID.con - The logical connection.true, if a clone already exists.SQLExceptionpublic Long findNextEnzymeId(Connection con) throws SQLException
con - The connection.SQLExceptionCopyright © 2014 EMBL-EBI. All rights reserved.