org.apache.jackrabbit.core.fs.db
Class DB2FileSystem

java.lang.Object
  extended byorg.apache.jackrabbit.core.fs.db.DbFileSystem
      extended byorg.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:

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>
 


Field Summary
 
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
 
Fields inherited from interface org.apache.jackrabbit.core.fs.FileSystem
SEPARATOR, SEPARATOR_CHAR
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2FileSystem

public DB2FileSystem()
Creates a new DB2FileSystem instance.

Method Detail

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.