org.biomoby.registry.rdfagent.util
Class CentralDataAccessImpl
java.lang.Object
org.biomoby.registry.rdfagent.util.CentralDataAccessImpl
- All Implemented Interfaces:
- CentralDataAccess
public class CentralDataAccessImpl
- extends Object
- implements CentralDataAccess
This class implements the interface CentralDataAccess using mysql
- Author:
- Eddie created Feb 1, 2006
CentralDataAccessImpl
public CentralDataAccessImpl()
throws MobyException
- Default Constructor
- Throws:
MobyException
- if the agent cannot load the JDBC driver
incrementErrorCountForURL
public boolean incrementErrorCountForURL(String signatureURL,
int errorCode)
throws MobyException
- Specified by:
incrementErrorCountForURL
in interface CentralDataAccess
- Parameters:
signatureURL
- the signature url to updateerrorCode
- the error code that caused this update
- Returns:
- true if the update succeeded, false otherwise.
- Throws:
MobyException
- if the agent cannot connect for any reason to the data store
decrementErrorCountForURL
public boolean decrementErrorCountForURL(String signatureURL)
throws MobyException
- Specified by:
decrementErrorCountForURL
in interface CentralDataAccess
- Parameters:
signatureURL
- the signature url to update
- Returns:
- true if the update succeeded, false otherwise.
- Throws:
MobyException
- if the agent cannot connect for any reason to the data store
deleteErrorCountForURL
public boolean deleteErrorCountForURL(String signatureURL)
throws MobyException
- Specified by:
deleteErrorCountForURL
in interface CentralDataAccess
- Parameters:
signatureURL
- the signature url to remove from the validity table.
- Returns:
- true if the deletion succeeded, false otherwise.
- Throws:
MobyException
- if the agent cannot connect for any reason to the data store
insertErrorCountForURL
public boolean insertErrorCountForURL(String signatureURL,
int errorCode)
throws MobyException
- Specified by:
insertErrorCountForURL
in interface CentralDataAccess
- Parameters:
signatureURL
- the signatureURL to insert into the validity tableerrorCode
- the 'code' for the error (most likely an HTTP response code)
- Returns:
- true if the the error count was successfully entered into the
data store. False otherwise.
- Throws:
MobyException
- if the agent cannot connect for any reason to the data store
getErrorCountForURL
public int getErrorCountForURL(String signatureURL)
throws MobyException
- Specified by:
getErrorCountForURL
in interface CentralDataAccess
- Parameters:
signatureURL
- the url to query an error count for
- Returns:
- the error count for a specific signature url
- Throws:
MobyException
- if the agent cannot connect for any reason to the data store
cleanup
public void cleanup()
- Description copied from interface:
CentralDataAccess
- Use this method to perform any 'clean up', i.e. for JDBC, close
connections, etc.
- Specified by:
cleanup
in interface CentralDataAccess
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010