org.aksw.commons.sparql.api.cache.extra
Class SqlDaoBase

java.lang.Object
  extended by org.aksw.commons.sparql.api.cache.extra.SqlDaoBase
All Implemented Interfaces:
SqlDao
Direct Known Subclasses:
CacheCoreH2

public class SqlDaoBase
extends Object
implements SqlDao


Field Summary
protected  Connection conn
           
protected  Map<Object,String> idToQuery
           
protected  Map<Object,PreparedStatement> queryToStmt
           
 
Constructor Summary
protected SqlDaoBase()
           
protected SqlDaoBase(Collection<? extends QueryString> queries)
           
 
Method Summary
<T> T
execute(Object id, Class<T> clazz, Object... args)
           
<T> List<T>
executeList(Object id, Class<T> clazz, Object... args)
           
 ResultSet executeQuery(Object id, Object... args)
           
 Connection getConnection()
          Set the JDBC connection object to be used by the DAO.
 void setConnection(Connection conn)
          Retrieve the JDBC connection object that is currently associated with this DAO.
protected  void setPreparedStatement(Object id, String query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected Connection conn

queryToStmt

protected Map<Object,PreparedStatement> queryToStmt

idToQuery

protected Map<Object,String> idToQuery
Constructor Detail

SqlDaoBase

protected SqlDaoBase()

SqlDaoBase

protected SqlDaoBase(Collection<? extends QueryString> queries)
Method Detail

setPreparedStatement

protected void setPreparedStatement(Object id,
                                    String query)

setConnection

public void setConnection(Connection conn)
                   throws SQLException
Description copied from interface: SqlDao
Retrieve the JDBC connection object that is currently associated with this DAO.

Specified by:
setConnection in interface SqlDao
Throws:
SQLException

execute

public <T> T execute(Object id,
                     Class<T> clazz,
                     Object... args)
          throws SQLException
Throws:
SQLException

executeList

public <T> List<T> executeList(Object id,
                               Class<T> clazz,
                               Object... args)
                    throws SQLException
Throws:
SQLException

executeQuery

public ResultSet executeQuery(Object id,
                              Object... args)
                       throws SQLException
Throws:
SQLException

getConnection

public Connection getConnection()
Description copied from interface: SqlDao
Set the JDBC connection object to be used by the DAO.

Specified by:
getConnection in interface SqlDao


Copyright © 2011. All Rights Reserved.