Version: 1.1.1

org.biomoby.registry.rdfagent.util
Class CentralDataAccessImpl

java.lang.Object
  extended by 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

Constructor Summary
CentralDataAccessImpl()
          Default Constructor
 
Method Summary
 void cleanup()
          Use this method to perform any 'clean up', i.e. for JDBC, close connections, etc.
 boolean decrementErrorCountForURL(String signatureURL)
           
 boolean deleteErrorCountForURL(String signatureURL)
           
 int getErrorCountForURL(String signatureURL)
           
 boolean incrementErrorCountForURL(String signatureURL, int errorCode)
           
 boolean insertErrorCountForURL(String signatureURL, int errorCode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentralDataAccessImpl

public CentralDataAccessImpl()
                      throws MobyException
Default Constructor

Throws:
MobyException - if the agent cannot load the JDBC driver
Method Detail

incrementErrorCountForURL

public boolean incrementErrorCountForURL(String signatureURL,
                                         int errorCode)
                                  throws MobyException
Specified by:
incrementErrorCountForURL in interface CentralDataAccess
Parameters:
signatureURL - the signature url to update
errorCode - 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 table
errorCode - 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

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010