com.eurotech.framework.core.db
Class HsqlDbServiceImpl

java.lang.Object
  extended by com.eurotech.framework.core.db.HsqlDbServiceImpl
All Implemented Interfaces:
DbService

public class HsqlDbServiceImpl
extends Object
implements DbService


Constructor Summary
HsqlDbServiceImpl()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext, Map<String,Object> properties)
           
 void close(Connection conn)
          Releases a previously acquired JDCB connection to the DbService.
 void close(ResultSet... rss)
          Utility method to silently close a JDBC ResultSet without throwing SQLExcepton.
 void close(Statement... stmts)
          Utility method to silently close a JDBC Statement without throwing SQLExcepton.
protected  void deactivate(org.osgi.service.component.ComponentContext componentContext)
           
 Connection getConnection()
          Returns the JDBC Connection to be used to communicate with the embedded SQL database.
 boolean isLogDataEnabled()
           
 void rollback(Connection conn)
          Utility method to silently rollback a JDBC Connection without throwing SQLExcepton.
 void setSystemService(SystemService systemService)
           
 void unsetSystemService(SystemService systemService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlDbServiceImpl

public HsqlDbServiceImpl()
Method Detail

setSystemService

public void setSystemService(SystemService systemService)

unsetSystemService

public void unsetSystemService(SystemService systemService)

activate

protected void activate(org.osgi.service.component.ComponentContext componentContext,
                        Map<String,Object> properties)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext componentContext)

getConnection

public Connection getConnection()
                         throws SQLException
Description copied from interface: DbService
Returns the JDBC Connection to be used to communicate with the embedded SQL database. For each acquired connection, the DbService.close() method must be called.

Specified by:
getConnection in interface DbService
Returns:
Connection to be used
Throws:
SQLException

rollback

public void rollback(Connection conn)
Description copied from interface: DbService
Utility method to silently rollback a JDBC Connection without throwing SQLExcepton. The method will catch any SQLExcepton thrown and log it.

Specified by:
rollback in interface DbService

close

public void close(ResultSet... rss)
Description copied from interface: DbService
Utility method to silently close a JDBC ResultSet without throwing SQLExcepton. The method will catch any SQLExcepton thrown and log it.

Specified by:
close in interface DbService

close

public void close(Statement... stmts)
Description copied from interface: DbService
Utility method to silently close a JDBC Statement without throwing SQLExcepton. The method will catch any SQLExcepton thrown and log it.

Specified by:
close in interface DbService

close

public void close(Connection conn)
Description copied from interface: DbService
Releases a previously acquired JDCB connection to the DbService.

Specified by:
close in interface DbService
Parameters:
conn - to be released

isLogDataEnabled

public boolean isLogDataEnabled()


Copyright © 2013. All Rights Reserved.