xsmeral.semnet.crawler
Class RDBLayer

java.lang.Object
  extended by xsmeral.semnet.crawler.RDBLayer

public class RDBLayer
extends Object

Relational DB Layer for Crawler.


Constructor Summary
RDBLayer(Properties dbProps)
          Constructs the DB layer with parameters specified in the given Properties instance.
RDBLayer(String dbDriverClassName, String dbURL, String dbUser, String dbPassword, String dbSchema, boolean autoCommit)
           
 
Method Summary
 boolean equals(Object obj)
           
 Connection getConnection()
          Returns a new connection to the database.
 Class getDriver()
           
 String getPassword()
           
 String getSchema()
           
 String getURL()
           
 String getUser()
           
 int hashCode()
           
 boolean isAutoCommit()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBLayer

public RDBLayer(Properties dbProps)
         throws ConfigurationException
Constructs the DB layer with parameters specified in the given Properties instance. The parameters are:

Throws:
ConfigurationException

RDBLayer

public RDBLayer(String dbDriverClassName,
                String dbURL,
                String dbUser,
                String dbPassword,
                String dbSchema,
                boolean autoCommit)
         throws ConfigurationException
Throws:
ConfigurationException
Method Detail

isAutoCommit

public boolean isAutoCommit()

getDriver

public Class getDriver()

getPassword

public String getPassword()

getURL

public String getURL()

getUser

public String getUser()

getSchema

public String getSchema()

getConnection

public Connection getConnection()
                         throws SQLException
Returns a new connection to the database. After getting a connection, the caller is responsible to close it as well. This class doesn't take care of the connections after creation.

Returns:
A new connection
Throws:
SQLException - If the driver manager fails to return a connection

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object