org.apache.jackrabbit.core.fs.db
Class DB2FileSystem
java.lang.Object
org.apache.jackrabbit.core.fs.db.DbFileSystem
org.apache.jackrabbit.core.fs.db.DB2FileSystem
- All Implemented Interfaces:
- FileSystem
- 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 user
password
: the user's password
schemaObjectPrefix
: prefix to be prepended to schema objects
See also 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>
Fields inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem |
con, copyFilesStmt, copyFileStmt, deleteFileStmt, deleteFolderStmt, driver, INITIAL_BUFFER_SIZE, initialized, insertFileStmt, insertFolderStmt, password, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, selectChildCountStmt, selectDataStmt, selectExistStmt, selectFileAndFolderNamesStmt, selectFileExistStmt, selectFileNamesStmt, selectFolderExistStmt, selectFolderNamesStmt, selectLastModifiedStmt, selectLengthStmt, updateDataStmt, updateLastModifiedStmt, url, user |
Constructor Summary |
DB2FileSystem()
Creates a new DB2FileSystem instance. |
Method Summary |
void |
init()
Initialize the file system
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. |
Methods inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem |
checkSchema, close, closeResultSet, closeStatement, closeStream, copy, copyDeepFolder, copyFile, createDeepFolder, createFolder, deleteFile, deleteFolder, equals, exists, getDriver, getInputStream, getOutputStream, getPassword, getRandomAccessOutputStream, getSchema, getSchemaObjectPrefix, getUrl, getUser, hasChildren, hashCode, isFile, isFolder, lastModified, length, list, listFiles, listFolders, move, prepareSchemaObjectPrefix, resetStatement, setDriver, setPassword, setSchema, setSchemaObjectPrefix, setUrl, setUser, touch, verifyRoodExists |
DB2FileSystem
public DB2FileSystem()
- Creates a new
DB2FileSystem
instance.
init
public void init()
throws FileSystemException
- Initialize the file system
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.
- Specified by:
init
in interface FileSystem
- Overrides:
init
in class DbFileSystem
- Throws:
FileSystemException
Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.