public class DB2FileSystem extends DbFileSystem
DB2FileSystem
is a JDBC-based FileSystem
implementation for Jackrabbit that persists file system entries in a
DB2 database.
It is configured through the following properties:
driver
: the FQN name of the JDBC driver class
(default: "com.ibm.db2.jcc.DB2Driver"
)schema
: type of schema to be used
(default: "db2"
)url
: the database url (e.g.
"jdbc:db2:[database]"
)user
: the database userpassword
: the user's passwordschemaObjectPrefix
: prefix to be prepended to schema objectsDbFileSystem
.
The following is a fragment from a sample configuration:
<FileSystem class="org.apache.jackrabbit.core.fs.db.DB2FileSystem"> <param name="url" value="jdbc:db2:test"/> <param name="schemaObjectPrefix" value="rep_"/> </FileSystem>
dataSourceName, driver, password, url, user
conHelper, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, updateDataSQL, updateLastModifiedSQL
SEPARATOR, SEPARATOR_CHAR
Constructor and Description |
---|
DB2FileSystem()
Creates a new
DB2FileSystem instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
buildSQLStatements()
Builds the SQL statements
|
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUser
close, createCheckSchemaOperation, createConnectionHelper, createDeepFolder, createFolder, deleteFile, deleteFolder, exists, getInputStream, getOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, init, isFile, isFolder, isSchemaCheckEnabled, lastModified, length, list, listFiles, listFolders, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, verifyRootExists
protected void buildSQLStatements()
Since DB2 requires parameter markers within the select clause to be
explicitly typed using cast(? as type_name)
some statements
had to be changed accordingly.
buildSQLStatements
in class DatabaseFileSystem
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.