Package org.apache.jackrabbit.core.fs.db
Class DB2FileSystem
- java.lang.Object
-
- org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
-
- org.apache.jackrabbit.core.fs.db.DbFileSystem
-
- org.apache.jackrabbit.core.fs.db.DB2FileSystem
-
- All Implemented Interfaces:
FileSystem
,DatabaseAware
public class DB2FileSystem extends DbFileSystem
DB2FileSystem
is a JDBC-basedFileSystem
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 objects
DbFileSystem
.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>
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
dataSourceName, driver, password, url, user
-
Fields inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
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
-
Fields inherited from interface org.apache.jackrabbit.core.fs.FileSystem
SEPARATOR, SEPARATOR_CHAR
-
-
Constructor Summary
Constructors Constructor Description DB2FileSystem()
Creates a newDB2FileSystem
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildSQLStatements()
Builds the SQL statements-
Methods inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUser
-
Methods inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
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
-
-
-
-
Method Detail
-
buildSQLStatements
protected void buildSQLStatements()
Builds the SQL statementsSince DB2 requires parameter markers within the select clause to be explicitly typed using
cast(? as type_name)
some statements had to be changed accordingly.- Overrides:
buildSQLStatements
in classDatabaseFileSystem
-
-