|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ebi.intenz.mapper.EnzymeEntryMapper
public class EnzymeEntryMapper
Maps enzyme entry information to the corresponding database tables.
IMPORTANT: after using instances of this class, call the
close() method, otherwise the underlying Rhea mapper objects will
keep their statements open.
| Constructor Summary | |
|---|---|
EnzymeEntryMapper()
|
|
EnzymeEntryMapper(EnzymeReactionMapper enzymeReactionMapper)
|
|
| Method Summary | |
|---|---|
boolean |
cloneExists(Long id,
Connection con)
Checks if a clone of an enzyme already exists. |
void |
close()
|
static boolean |
ecExists(EnzymeCommissionNumber ec,
Connection con)
Checks whether a given EC number already exists in the database. |
List<EnzymeEntry> |
exportAllEntries(Connection con)
Exports every piece of data for publicly available entries. |
List<EnzymeEntry> |
exportApprovedSibEntries(Connection con)
Tries to export all approved entries containing only ENZYME relevant information. |
protected void |
finalize()
|
List<EnzymeEntry> |
findAll(Connection con)
Tries to find all public entries but loads the entries only with minimum information. |
List<EnzymeEntry> |
findAllByEc(int ec1,
int ec2,
int ec3,
int ec4,
Boolean preliminary,
Connection con)
|
List<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<EnzymeEntry> |
findAllSubSubclassEntriesByEc(int ec1,
int ec2,
int ec3,
Connection con)
|
EnzymeEntry |
findByEc(int ec1,
int ec2,
int ec3,
int ec4,
Status status,
Connection con)
Tries to find entry information about an enzyme. |
EnzymeEntry |
findByEc(String ecString,
Status status,
Connection con)
Finds an enzyme by EC number (as String) and status. |
EnzymeEntry |
findById(long id,
Connection con)
Loads a complete version of the enzyme with the given ID. |
EnzymeEntry |
findById(Long id,
Connection con,
boolean ghost)
Tries to find entry information about an enzyme. |
List<EnzymeEntry> |
findByStatus(Connection con,
Status status)
Retrieves the list of enzymes with a given status. |
EnzymeCommissionNumber |
findEC(String id,
Connection con)
Returns the EC number of the given enzyme ID. |
List<EnzymeEntry> |
findFullProposedList(Connection con)
Tries to find all proposed entries with all information. |
List<EnzymeEntry> |
findFullSuggestedList(Connection con)
Tries to find all suggested entries with all information. |
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,
Status status,
Connection con)
|
List<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<EnzymeEntry> |
findPreliminaryEcsList(Connection con)
Gets the list of preliminary EC numbers issued by UniProt. |
List<EnzymeEntry> |
findProposedList(Connection con)
Tries to find all proposed entries but loads the entries only with minimum information. |
EnzymeStatistics |
findStats(Connection con)
|
List<EnzymeEntry> |
findSuggestedList(Connection con)
Tries to find all suggested entries but loads the entries only with minimum information. |
void |
insert(Long enzymeId,
EnzymeCommissionNumber ec,
Status status,
EnzymeSourceConstant source,
String note,
String historyLine,
boolean isActive,
Connection con)
Inserts the core data of a new enzyme entry. |
void |
update(Long enzymeId,
EnzymeCommissionNumber ec,
Status status,
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,
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,
Status status,
Connection con)
Updates the status of the given enzyme. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EnzymeEntryMapper()
public EnzymeEntryMapper(EnzymeReactionMapper enzymeReactionMapper)
| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic void close()
public EnzymeEntry findByEc(int ec1,
int ec2,
int ec3,
int ec4,
Status status,
Connection con)
throws SQLException,
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.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public EnzymeEntry findByEc(String ecString,
Status status,
Connection con)
throws NumberFormatException,
SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
ecString - the EC number.status - the enzyme status.con - a database connection.
null if not found.
NumberFormatException
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException
public List<EnzymeEntry> findAllByEc(int ec1,
int ec2,
int ec3,
int ec4,
Boolean preliminary,
Connection con)
throws SQLException,
DomainException
SQLException
DomainException
public List<EnzymeEntry> findAllByEc(int ec1,
int ec2,
int ec3,
int ec4,
Connection con)
throws SQLException,
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.
DomainException - if any error related to domain information occurs.
public List<EnzymeEntry> findAllSubSubclassEntriesByEc(int ec1,
int ec2,
int ec3,
Connection con)
throws SQLException,
DomainException
SQLException
DomainException
public EnzymeEntry findById(Long id,
Connection con,
boolean ghost)
throws SQLException,
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.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor
info for non-ghosts.
public EnzymeEntry findById(long id,
Connection con)
throws SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
id - con -
EnzymeEntry instance
or null if nothing has been found.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public EnzymeEntry findGhostById(int id,
Connection con)
throws SQLException,
DomainException
id - The enzyme ID.con - The logical connection.
EnzymeEntry instance or null if nothing has been found.
SQLException
DomainException
public Long findIDInMappingTable(String ec,
Status status,
Connection con)
throws SQLException
SQLException
public List<EnzymeEntry> findAll(Connection con)
throws SQLException,
DomainException
con - The logical connection.
List of EnzymeEntry instances
or null if nothing has been found.
SQLException
DomainException
public List<EnzymeEntry> findList(String ec1,
String ec2,
String ec3,
Connection con)
throws SQLException,
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.
SQLException
DomainException
public List<EnzymeEntry> findByStatus(Connection con,
Status status)
throws SQLException,
DomainException
con - status -
SQLException
DomainException
public List<EnzymeEntry> findProposedList(Connection con)
throws SQLException,
DomainException
con - The logical connection.
List of
EnzymeEntry instances.
SQLException - if a database error occurs.
DomainException - if a domain related error occurs.
public List<EnzymeEntry> findSuggestedList(Connection con)
throws SQLException,
DomainException
con - The logical connection.
Vector of EnzymeEntry instances
or null if nothing has been found.
SQLException
DomainException
public List<EnzymeEntry> findPreliminaryEcsList(Connection con)
throws SQLException,
DomainException
con -
SQLException
DomainException
public List<EnzymeEntry> exportAllEntries(Connection con)
throws SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
con -
List of EnzymeEntrys
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public List<EnzymeEntry> exportApprovedSibEntries(Connection con)
throws SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.
ArrayList of EnzymeEntry instances or null
if nothing has been found.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public List<EnzymeEntry> findFullProposedList(Connection con)
throws SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.
Vector of EnzymeEntry instances or null
if nothing has been found.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public List<EnzymeEntry> findFullSuggestedList(Connection con)
throws SQLException,
DomainException,
uk.ac.ebi.rhea.mapper.MapperException
con - The logical connection.
Vector of EnzymeEntry instances or null
if nothing has been found.
SQLException
DomainException
uk.ac.ebi.rhea.mapper.MapperException - in case of problem retrieving reaction/cofactor info.
public EnzymeCommissionNumber findEC(String id,
Connection con)
throws SQLException,
DomainException
id - The enzyme ID.con - The logical connection.
null.
SQLException
DomainException
public static boolean ecExists(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 null
public String findHistoryLine(Long id,
Connection con)
throws SQLException
id - The enzyme ID.con - The logical connection.
null.
SQLException
public String findNote(Long id,
Connection con)
throws SQLException
id - The enzyme ID.con - The logical connection.
null.
SQLException
public EnzymeStatistics findStats(Connection con)
throws SQLException
con - The logical connection.
SQLException
public void insert(Long enzymeId,
EnzymeCommissionNumber ec,
Status status,
EnzymeSourceConstant source,
String note,
String historyLine,
boolean isActive,
Connection con)
throws SQLException
findNextEnzymeId(java.sql.Connection)
enzymeId - ec - status - source - isActive - note - historyLine - con -
SQLException
public void update(Long enzymeId,
EnzymeCommissionNumber ec,
Status status,
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.
SQLException
public void updateEc(Long enzymeId,
EnzymeCommissionNumber newEc,
Connection con)
throws SQLException
enzymeId - The enzyme's ID.newEc - The new EC.con - The logical connection.
SQLException
public void updateNote(Long enzymeId,
String note,
Connection con)
throws SQLException
enzymeId - The enzyme's ID.note - The note.con - The logical connection.
SQLException
public void updateStatus(Long enzymeId,
Status status,
Connection con)
throws SQLException
enzymeId - The enzyme's ID.status - The status.con - The logical connection.
SQLException
public void updateHistoryLine(Long enzymeId,
String historyLine,
Connection con)
throws SQLException
enzymeId - The enzyme's ID.historyLine - The new history line.con - The logical connection.
SQLException
public boolean cloneExists(Long id,
Connection con)
throws SQLException
id - The enzyme ID.con - The logical connection.
true, if a clone already exists.
SQLException
public Long findNextEnzymeId(Connection con)
throws SQLException
con - The connection.
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||