Class ExportDumpConnection
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.export.ExportDumpConnection
-
- All Implemented Interfaces:
AutoCloseable
,Connection
,Wrapper
public class ExportDumpConnection extends Object implements Connection
Special "Connection
" that supports writing data to a different storage then a data base. I.e., a file dump. Only few inherited methods have a meaningful implementation, most methods will throw aUnsupportedOperationException
.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
-
-
Field Summary
-
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
-
Constructor Summary
Constructors Constructor Description ExportDumpConnection(Exporter exporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(Executor executor)
void
clearWarnings()
void
close()
Simply forwards call toExporter
which will close any open resources.void
commit()
Simply forwards call toExporter
which may then flush its buffers.Array
createArrayOf(String typeName, Object[] elements)
Blob
createBlob()
Clob
createClob()
NClob
createNClob()
SQLXML
createSQLXML()
Statement
createStatement()
Statement
createStatement(int resultSetType, int resultSetConcurrency)
Statement
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Struct
createStruct(String typeName, Object[] attributes)
void
finalizeWriteRowData(TableMetaData table)
void
finalizeWriteTableData(TableMetaData table)
Simply forwards call toExporter
.boolean
getAutoCommit()
String
getCatalog()
Properties
getClientInfo()
String
getClientInfo(String name)
int
getHoldability()
DatabaseMetaData
getMetaData()
int
getNetworkTimeout()
String
getSchema()
int
getTransactionIsolation()
Map<String,Class<?>>
getTypeMap()
SQLWarning
getWarnings()
void
initializeWriteRowData(TableMetaData table)
void
initializeWriteTableData(TableMetaData table)
Simply forwards call toExporter
.boolean
isClosed()
boolean
isReadOnly()
boolean
isValid(int timeout)
boolean
isWrapperFor(Class<?> iface)
String
nativeSQL(String sql)
CallableStatement
prepareCall(String sql)
CallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency)
CallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
PreparedStatement
prepareStatement(String sql)
Returns PreparedStatement object for export.PreparedStatement
prepareStatement(String sql, int autoGeneratedKeys)
PreparedStatement
prepareStatement(String sql, int[] columnIndexes)
PreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
PreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
PreparedStatement
prepareStatement(String sql, String[] columnNames)
void
releaseSavepoint(Savepoint savepoint)
void
rollback()
void
rollback(Savepoint savepoint)
void
setAutoCommit(boolean autoCommit)
void
setCatalog(String catalog)
void
setClientInfo(String name, String value)
void
setClientInfo(Properties properties)
void
setHoldability(int holdability)
void
setNetworkTimeout(Executor executor, int milliseconds)
void
setReadOnly(boolean readOnly)
Savepoint
setSavepoint()
Savepoint
setSavepoint(String name)
void
setSchema(String schema)
void
setTransactionIsolation(int level)
void
setTypeMap(Map<String,Class<?>> map)
<T> T
unwrap(Class<T> iface)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
-
-
-
Constructor Detail
-
ExportDumpConnection
public ExportDumpConnection(Exporter exporter)
-
-
Method Detail
-
prepareStatement
public PreparedStatement prepareStatement(String sql)
Returns PreparedStatement object for export.- Specified by:
prepareStatement
in interfaceConnection
-
initializeWriteTableData
public void initializeWriteTableData(TableMetaData table) throws ExportException
Simply forwards call toExporter
.- Throws:
ExportException
-
finalizeWriteTableData
public void finalizeWriteTableData(TableMetaData table) throws ExportException
Simply forwards call toExporter
.- Throws:
ExportException
-
initializeWriteRowData
public void initializeWriteRowData(TableMetaData table) throws ExportException
- Throws:
ExportException
-
finalizeWriteRowData
public void finalizeWriteRowData(TableMetaData table) throws ExportException
- Throws:
ExportException
-
close
public void close()
Simply forwards call toExporter
which will close any open resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceConnection
-
commit
public void commit()
Simply forwards call toExporter
which may then flush its buffers.- Specified by:
commit
in interfaceConnection
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceConnection
-
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- Specified by:
setAutoCommit
in interfaceConnection
-
getAutoCommit
public boolean getAutoCommit()
- Specified by:
getAutoCommit
in interfaceConnection
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnly
in interfaceConnection
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfaceConnection
-
rollback
public void rollback()
- Specified by:
rollback
in interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
- Specified by:
prepareStatement
in interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
- Specified by:
prepareStatement
in interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, String[] columnNames)
- Specified by:
prepareStatement
in interfaceConnection
-
createStatement
public Statement createStatement()
- Specified by:
createStatement
in interfaceConnection
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
- Specified by:
isWrapperFor
in interfaceWrapper
-
prepareCall
public CallableStatement prepareCall(String sql)
- Specified by:
prepareCall
in interfaceConnection
-
nativeSQL
public String nativeSQL(String sql)
- Specified by:
nativeSQL
in interfaceConnection
-
getMetaData
public DatabaseMetaData getMetaData()
- Specified by:
getMetaData
in interfaceConnection
-
setCatalog
public void setCatalog(String catalog)
- Specified by:
setCatalog
in interfaceConnection
-
getCatalog
public String getCatalog()
- Specified by:
getCatalog
in interfaceConnection
-
setTransactionIsolation
public void setTransactionIsolation(int level)
- Specified by:
setTransactionIsolation
in interfaceConnection
-
getTransactionIsolation
public int getTransactionIsolation()
- Specified by:
getTransactionIsolation
in interfaceConnection
-
getWarnings
public SQLWarning getWarnings()
- Specified by:
getWarnings
in interfaceConnection
-
clearWarnings
public void clearWarnings()
- Specified by:
clearWarnings
in interfaceConnection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency)
- Specified by:
createStatement
in interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
- Specified by:
prepareStatement
in interfaceConnection
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
- Specified by:
prepareCall
in interfaceConnection
-
getTypeMap
public Map<String,Class<?>> getTypeMap()
- Specified by:
getTypeMap
in interfaceConnection
-
setTypeMap
public void setTypeMap(Map<String,Class<?>> map)
- Specified by:
setTypeMap
in interfaceConnection
-
setHoldability
public void setHoldability(int holdability)
- Specified by:
setHoldability
in interfaceConnection
-
getHoldability
public int getHoldability()
- Specified by:
getHoldability
in interfaceConnection
-
setSavepoint
public Savepoint setSavepoint()
- Specified by:
setSavepoint
in interfaceConnection
-
setSavepoint
public Savepoint setSavepoint(String name)
- Specified by:
setSavepoint
in interfaceConnection
-
rollback
public void rollback(Savepoint savepoint)
- Specified by:
rollback
in interfaceConnection
-
releaseSavepoint
public void releaseSavepoint(Savepoint savepoint)
- Specified by:
releaseSavepoint
in interfaceConnection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
createStatement
in interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
prepareStatement
in interfaceConnection
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
prepareCall
in interfaceConnection
-
createClob
public Clob createClob()
- Specified by:
createClob
in interfaceConnection
-
createBlob
public Blob createBlob()
- Specified by:
createBlob
in interfaceConnection
-
createNClob
public NClob createNClob()
- Specified by:
createNClob
in interfaceConnection
-
createSQLXML
public SQLXML createSQLXML()
- Specified by:
createSQLXML
in interfaceConnection
-
isValid
public boolean isValid(int timeout)
- Specified by:
isValid
in interfaceConnection
-
setClientInfo
public void setClientInfo(String name, String value) throws SQLClientInfoException
- Specified by:
setClientInfo
in interfaceConnection
- Throws:
SQLClientInfoException
-
setClientInfo
public void setClientInfo(Properties properties) throws SQLClientInfoException
- Specified by:
setClientInfo
in interfaceConnection
- Throws:
SQLClientInfoException
-
getClientInfo
public String getClientInfo(String name)
- Specified by:
getClientInfo
in interfaceConnection
-
getClientInfo
public Properties getClientInfo()
- Specified by:
getClientInfo
in interfaceConnection
-
createArrayOf
public Array createArrayOf(String typeName, Object[] elements)
- Specified by:
createArrayOf
in interfaceConnection
-
createStruct
public Struct createStruct(String typeName, Object[] attributes)
- Specified by:
createStruct
in interfaceConnection
-
setSchema
public void setSchema(String schema)
- Specified by:
setSchema
in interfaceConnection
-
getSchema
public String getSchema()
- Specified by:
getSchema
in interfaceConnection
-
abort
public void abort(Executor executor)
- Specified by:
abort
in interfaceConnection
-
setNetworkTimeout
public void setNetworkTimeout(Executor executor, int milliseconds)
- Specified by:
setNetworkTimeout
in interfaceConnection
-
getNetworkTimeout
public int getNetworkTimeout()
- Specified by:
getNetworkTimeout
in interfaceConnection
-
-