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 voidabort(Executor executor)voidclearWarnings()voidclose()Simply forwards call toExporterwhich will close any open resources.voidcommit()Simply forwards call toExporterwhich may then flush its buffers.ArraycreateArrayOf(String typeName, Object[] elements)BlobcreateBlob()ClobcreateClob()NClobcreateNClob()SQLXMLcreateSQLXML()StatementcreateStatement()StatementcreateStatement(int resultSetType, int resultSetConcurrency)StatementcreateStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)StructcreateStruct(String typeName, Object[] attributes)voidfinalizeWriteRowData(TableMetaData table)voidfinalizeWriteTableData(TableMetaData table)Simply forwards call toExporter.booleangetAutoCommit()StringgetCatalog()PropertiesgetClientInfo()StringgetClientInfo(String name)intgetHoldability()DatabaseMetaDatagetMetaData()intgetNetworkTimeout()StringgetSchema()intgetTransactionIsolation()Map<String,Class<?>>getTypeMap()SQLWarninggetWarnings()voidinitializeWriteRowData(TableMetaData table)voidinitializeWriteTableData(TableMetaData table)Simply forwards call toExporter.booleanisClosed()booleanisReadOnly()booleanisValid(int timeout)booleanisWrapperFor(Class<?> iface)StringnativeSQL(String sql)CallableStatementprepareCall(String sql)CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency)CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)PreparedStatementprepareStatement(String sql)Returns PreparedStatement object for export.PreparedStatementprepareStatement(String sql, int autoGeneratedKeys)PreparedStatementprepareStatement(String sql, int[] columnIndexes)PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency)PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)PreparedStatementprepareStatement(String sql, String[] columnNames)voidreleaseSavepoint(Savepoint savepoint)voidrollback()voidrollback(Savepoint savepoint)voidsetAutoCommit(boolean autoCommit)voidsetCatalog(String catalog)voidsetClientInfo(String name, String value)voidsetClientInfo(Properties properties)voidsetHoldability(int holdability)voidsetNetworkTimeout(Executor executor, int milliseconds)voidsetReadOnly(boolean readOnly)SavepointsetSavepoint()SavepointsetSavepoint(String name)voidsetSchema(String schema)voidsetTransactionIsolation(int level)voidsetTypeMap(Map<String,Class<?>> map)<T> Tunwrap(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:
prepareStatementin 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 toExporterwhich will close any open resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection
-
commit
public void commit()
Simply forwards call toExporterwhich may then flush its buffers.- Specified by:
commitin interfaceConnection
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceConnection
-
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- Specified by:
setAutoCommitin interfaceConnection
-
getAutoCommit
public boolean getAutoCommit()
- Specified by:
getAutoCommitin interfaceConnection
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnlyin interfaceConnection
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceConnection
-
rollback
public void rollback()
- Specified by:
rollbackin interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
- Specified by:
prepareStatementin interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
- Specified by:
prepareStatementin interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, String[] columnNames)
- Specified by:
prepareStatementin interfaceConnection
-
createStatement
public Statement createStatement()
- Specified by:
createStatementin interfaceConnection
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
- Specified by:
isWrapperForin interfaceWrapper
-
prepareCall
public CallableStatement prepareCall(String sql)
- Specified by:
prepareCallin interfaceConnection
-
nativeSQL
public String nativeSQL(String sql)
- Specified by:
nativeSQLin interfaceConnection
-
getMetaData
public DatabaseMetaData getMetaData()
- Specified by:
getMetaDatain interfaceConnection
-
setCatalog
public void setCatalog(String catalog)
- Specified by:
setCatalogin interfaceConnection
-
getCatalog
public String getCatalog()
- Specified by:
getCatalogin interfaceConnection
-
setTransactionIsolation
public void setTransactionIsolation(int level)
- Specified by:
setTransactionIsolationin interfaceConnection
-
getTransactionIsolation
public int getTransactionIsolation()
- Specified by:
getTransactionIsolationin interfaceConnection
-
getWarnings
public SQLWarning getWarnings()
- Specified by:
getWarningsin interfaceConnection
-
clearWarnings
public void clearWarnings()
- Specified by:
clearWarningsin interfaceConnection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency)
- Specified by:
createStatementin interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
- Specified by:
prepareStatementin interfaceConnection
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
- Specified by:
prepareCallin interfaceConnection
-
getTypeMap
public Map<String,Class<?>> getTypeMap()
- Specified by:
getTypeMapin interfaceConnection
-
setTypeMap
public void setTypeMap(Map<String,Class<?>> map)
- Specified by:
setTypeMapin interfaceConnection
-
setHoldability
public void setHoldability(int holdability)
- Specified by:
setHoldabilityin interfaceConnection
-
getHoldability
public int getHoldability()
- Specified by:
getHoldabilityin interfaceConnection
-
setSavepoint
public Savepoint setSavepoint()
- Specified by:
setSavepointin interfaceConnection
-
setSavepoint
public Savepoint setSavepoint(String name)
- Specified by:
setSavepointin interfaceConnection
-
rollback
public void rollback(Savepoint savepoint)
- Specified by:
rollbackin interfaceConnection
-
releaseSavepoint
public void releaseSavepoint(Savepoint savepoint)
- Specified by:
releaseSavepointin interfaceConnection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
createStatementin interfaceConnection
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
prepareStatementin interfaceConnection
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Specified by:
prepareCallin interfaceConnection
-
createClob
public Clob createClob()
- Specified by:
createClobin interfaceConnection
-
createBlob
public Blob createBlob()
- Specified by:
createBlobin interfaceConnection
-
createNClob
public NClob createNClob()
- Specified by:
createNClobin interfaceConnection
-
createSQLXML
public SQLXML createSQLXML()
- Specified by:
createSQLXMLin interfaceConnection
-
isValid
public boolean isValid(int timeout)
- Specified by:
isValidin interfaceConnection
-
setClientInfo
public void setClientInfo(String name, String value) throws SQLClientInfoException
- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
setClientInfo
public void setClientInfo(Properties properties) throws SQLClientInfoException
- Specified by:
setClientInfoin interfaceConnection- Throws:
SQLClientInfoException
-
getClientInfo
public String getClientInfo(String name)
- Specified by:
getClientInfoin interfaceConnection
-
getClientInfo
public Properties getClientInfo()
- Specified by:
getClientInfoin interfaceConnection
-
createArrayOf
public Array createArrayOf(String typeName, Object[] elements)
- Specified by:
createArrayOfin interfaceConnection
-
createStruct
public Struct createStruct(String typeName, Object[] attributes)
- Specified by:
createStructin interfaceConnection
-
setSchema
public void setSchema(String schema)
- Specified by:
setSchemain interfaceConnection
-
getSchema
public String getSchema()
- Specified by:
getSchemain interfaceConnection
-
abort
public void abort(Executor executor)
- Specified by:
abortin interfaceConnection
-
setNetworkTimeout
public void setNetworkTimeout(Executor executor, int milliseconds)
- Specified by:
setNetworkTimeoutin interfaceConnection
-
getNetworkTimeout
public int getNetworkTimeout()
- Specified by:
getNetworkTimeoutin interfaceConnection
-
-