public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver
| Modifier and Type | Field and Description |
|---|---|
protected PreparedStatement |
appendToLargeObject |
protected PreparedStatement |
copyFileRecord |
protected PreparedStatement |
createFile |
protected PreparedStatement |
deleteFile |
protected PreparedStatement |
readLargeObject |
protected PreparedStatement |
renameFile |
protected PreparedStatement |
selectFileByFileName |
protected PreparedStatement |
selectFileNamesByExtension |
connection, sqlProvider| Modifier and Type | Method and Description |
|---|---|
long |
calculateReadLength(long objectLength,
int bufferSpace,
long readPosition) |
void |
copyFileData(JDBCSequentialFile fileFrom,
JDBCSequentialFile fileTo)
Copy the data content of FileFrom to FileTo
|
void |
createFile(JDBCSequentialFile file)
Creates a new database row representing the supplied file.
|
protected void |
createSchema() |
void |
deleteFile(JDBCSequentialFile file)
Deletes the associated row in the database.
|
void |
destroy()
Drop all tables and data
|
long |
fileExists(JDBCSequentialFile file)
Checks to see if a file with filename and extension exists.
|
long |
getMaxSize() |
List<String> |
listFiles(String extension) |
void |
loadFile(JDBCSequentialFile file)
Loads an existing file.
|
void |
openFile(JDBCSequentialFile file)
Opens the supplied file.
|
protected void |
prepareStatements() |
int |
readFromFile(JDBCSequentialFile file,
ByteBuffer bytes)
Reads data from the file (at file.readPosition) into the byteBuffer.
|
void |
renameFile(JDBCSequentialFile file,
String newFileName)
Updates the fileName field to the new value.
|
int |
writeToFile(JDBCSequentialFile file,
byte[] data)
Persists data to this files associated database mapping.
|
createTable, getConnection, setConnection, setDataSource, setJdbcConnectionUrl, setJdbcDriverClass, setNetworkTimeout, setSqlProvider, start, stopprotected PreparedStatement deleteFile
protected PreparedStatement createFile
protected PreparedStatement selectFileByFileName
protected PreparedStatement copyFileRecord
protected PreparedStatement renameFile
protected PreparedStatement readLargeObject
protected PreparedStatement appendToLargeObject
protected PreparedStatement selectFileNamesByExtension
protected void createSchema()
throws SQLException
createSchema in class AbstractJDBCDriverSQLExceptionprotected void prepareStatements()
throws SQLException
prepareStatements in class AbstractJDBCDriverSQLExceptionpublic void openFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic long fileExists(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void loadFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void createFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic void renameFile(JDBCSequentialFile file, String newFileName) throws SQLException
file - newFileName - SQLExceptionpublic void deleteFile(JDBCSequentialFile file) throws SQLException
file - SQLExceptionpublic int writeToFile(JDBCSequentialFile file, byte[] data) throws SQLException
file - data - SQLExceptionpublic int readFromFile(JDBCSequentialFile file, ByteBuffer bytes) throws SQLException
file - bytes - SQLExceptionpublic void copyFileData(JDBCSequentialFile fileFrom, JDBCSequentialFile fileTo) throws SQLException
fileFrom - fileTo - SQLExceptionpublic void destroy()
throws SQLException
destroy in class AbstractJDBCDriverSQLExceptionpublic long calculateReadLength(long objectLength,
int bufferSpace,
long readPosition)
public long getMaxSize()
Copyright © 2018 JBoss by Red Hat. All rights reserved.