public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver
| Modifier and Type | Field and Description |
|---|---|
protected String |
appendToLargeObject |
protected Integer |
appendToLargeObjectResultSetConcurrency |
protected Integer |
appendToLargeObjectResultSetType |
protected String |
copyFileRecord |
protected String |
createFile |
protected int |
createFileAutogeneratedKeys |
protected String[] |
createFileColumnNames |
protected String |
deleteFile |
protected String |
readLargeObject |
protected String |
renameFile |
protected String |
selectFileByFileName |
protected String |
selectFileNamesByExtension |
connectionProvider, 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) |
int |
writeToFile(JDBCSequentialFile file,
byte[] data,
boolean append)
Persists data to this files associated database mapping.
|
createTable, getJdbcConnectionProvider, setJdbcConnectionProvider, setSqlProvider, start, stopprotected String deleteFile
protected String createFile
protected String[] createFileColumnNames
protected int createFileAutogeneratedKeys
protected String selectFileByFileName
protected String copyFileRecord
protected String renameFile
protected String readLargeObject
protected String appendToLargeObject
protected Integer appendToLargeObjectResultSetType
protected Integer appendToLargeObjectResultSetConcurrency
protected String selectFileNamesByExtension
protected void createSchema()
throws SQLException
createSchema in class AbstractJDBCDriverSQLExceptionprotected void prepareStatements()
prepareStatements in class AbstractJDBCDriverpublic 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
SQLExceptionpublic int writeToFile(JDBCSequentialFile file, byte[] data, boolean append) 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 © 2021 JBoss by Red Hat. All rights reserved.