org.databene.platform.db
Class ConnectionHolder

java.lang.Object
  extended by org.databene.platform.db.ConnectionHolder
All Implemented Interfaces:
java.io.Closeable

public class ConnectionHolder
extends java.lang.Object
implements java.io.Closeable

Wraps a database connection and provides access functionality.

Created: 07.01.2013 08:28:36

Since:
0.8.0
Author:
Volker Bergmann

Field Summary
 java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> insertStatements
           
 java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> selectByPKStatements
           
 java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> updateStatements
           
 
Constructor Summary
ConnectionHolder(DBSystem db)
           
 
Method Summary
 void close()
           
 void commit()
           
 java.sql.Connection getConnection()
           
 java.sql.PreparedStatement getSelectByPKStatement(ComplexTypeDescriptor descriptor)
           
 java.sql.PreparedStatement getStatement(ComplexTypeDescriptor descriptor, boolean insert, java.util.List<org.databene.jdbacl.ColumnInfo> columnInfos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertStatements

public java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> insertStatements

updateStatements

public java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> updateStatements

selectByPKStatements

public java.util.Map<ComplexTypeDescriptor,java.sql.PreparedStatement> selectByPKStatements
Constructor Detail

ConnectionHolder

public ConnectionHolder(DBSystem db)
Method Detail

getConnection

public java.sql.Connection getConnection()

commit

public void commit()

getSelectByPKStatement

public java.sql.PreparedStatement getSelectByPKStatement(ComplexTypeDescriptor descriptor)

getStatement

public java.sql.PreparedStatement getStatement(ComplexTypeDescriptor descriptor,
                                               boolean insert,
                                               java.util.List<org.databene.jdbacl.ColumnInfo> columnInfos)

close

public void close()
Specified by:
close in interface java.io.Closeable


Copyright © 2013. All Rights Reserved.