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, stop
protected 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 AbstractJDBCDriver
SQLException
protected void prepareStatements()
prepareStatements
in class AbstractJDBCDriver
public void openFile(JDBCSequentialFile file) throws SQLException
file
- SQLException
public long fileExists(JDBCSequentialFile file) throws SQLException
file
- SQLException
public void loadFile(JDBCSequentialFile file) throws SQLException
file
- SQLException
public void createFile(JDBCSequentialFile file) throws SQLException
file
- SQLException
public void renameFile(JDBCSequentialFile file, String newFileName) throws SQLException
file
- newFileName
- SQLException
public void deleteFile(JDBCSequentialFile file) throws SQLException
file
- SQLException
public int writeToFile(JDBCSequentialFile file, byte[] data) throws SQLException
SQLException
public int writeToFile(JDBCSequentialFile file, byte[] data, boolean append) throws SQLException
file
- data
- SQLException
public int readFromFile(JDBCSequentialFile file, ByteBuffer bytes) throws SQLException
file
- bytes
- SQLException
public void copyFileData(JDBCSequentialFile fileFrom, JDBCSequentialFile fileTo) throws SQLException
fileFrom
- fileTo
- SQLException
public void destroy() throws SQLException
destroy
in class AbstractJDBCDriver
SQLException
public long calculateReadLength(long objectLength, int bufferSpace, long readPosition)
public long getMaxSize()
Copyright © 2021 JBoss by Red Hat. All rights reserved.