org.apache.jackrabbit.core.persistence.bundle
Class OraclePersistenceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
      extended by org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
          extended by org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
All Implemented Interfaces:
CachingPersistenceManager, IterablePersistenceManager, PersistenceManager
Direct Known Subclasses:
Oracle9PersistenceManager

public class OraclePersistenceManager
extends BundleDbPersistenceManager

Extends the BundleDbPersistenceManager by Oracle specific code.

Configuration:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
BundleDbPersistenceManager.CloseableBLOBStore, BundleDbPersistenceManager.DbBlobStore, BundleDbPersistenceManager.FSBlobStore
 
Field Summary
static String TABLE_SPACE_VARIABLE
          the variable for the Oracle table space
protected  String tableSpace
          the Oracle table space to use
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
binding, blobStore, blockOnConnectionLoss, bundleDeleteSQL, bundleInsertSQL, bundleSelectAllIdsFromSQL, bundleSelectAllIdsSQL, bundleSelectSQL, bundleUpdateSQL, connectionManager, consistencyCheck, consistencyFix, driver, errorHandling, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, password, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, SM_BINARY_KEYS, SM_LONGLONG_KEYS, url, user
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
context, NODEFILENAME, NODEREFSFILENAME, RES_NAME_INDEX, RES_NS_INDEX
 
Constructor Summary
OraclePersistenceManager()
          Creates a new oracle persistence manager
 
Method Summary
protected  boolean checkTablesWithUser()
          Indicates if the user name should be included when retrieving the tables during BundleDbPersistenceManager.checkTablesExist().
protected  DbNameIndex createDbNameIndex()
          Returns a new instance of a NGKDbNameIndex.
protected  String createSchemaSQL(String sql)
          Creates an SQL statement for schema creation by variable substitution.
 String getTableSpace()
          Returns the configured Oracle table space.
 void init(PMContext context)
          Initializes the persistence manager.
protected  void prepareSchemaObjectPrefix()
          Since Oracle only supports table names up to 30 characters in length illegal characters are simply replaced with "_" rather than escaping them with "_x0000_".
 void setTableSpace(String tableSpace)
          Sets the Oracle table space.
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
buildSQLStatements, checkBundleConsistency, checkConsistency, checkSchema, checkTablesExist, close, closeResultSet, closeStatement, createBlobStore, createDBBlobStore, createLocalFSBlobStore, createParams, destroy, destroyBundle, exists, existsBundle, getAllNodeIds, getBinding, getBlockOnConnectionLoss, getConsistencyCheck, getConsistencyFix, getDriver, getErrorHandling, getKey, getMinBlobSize, getNameIndex, getPassword, getSchema, getSchemaObjectPrefix, getStorageModel, getUrl, getUser, isExternalBLOBs, load, loadBundle, loadBundle, logException, resetStatement, setBlockOnConnectionLoss, setConsistencyCheck, setConsistencyFix, setDriver, setErrorHandling, setExternalBLOBs, setKey, setMinBlobSize, setPassword, setSchema, setSchemaObjectPrefix, setUrl, setUser, store, store, storeBundle, toString, useDbBlobStore, useLocalFsBlobStore
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
buildBlobFilePath, buildNodeFilePath, buildNodeFolderPath, buildNodeReferencesFilePath, buildPropFilePath, createNew, createNew, evictBundle, exists, exists, getBundleCacheSize, getNsIndex, load, load, onExternalUpdate, setBundleCacheSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_SPACE_VARIABLE

public static final String TABLE_SPACE_VARIABLE
the variable for the Oracle table space

See Also:
Constant Field Values

tableSpace

protected String tableSpace
the Oracle table space to use

Constructor Detail

OraclePersistenceManager

public OraclePersistenceManager()
Creates a new oracle persistence manager

Method Detail

getTableSpace

public String getTableSpace()
Returns the configured Oracle table space.

Returns:
the configured Oracle table space.

setTableSpace

public void setTableSpace(String tableSpace)
Sets the Oracle table space.

Parameters:
tableSpace - the Oracle table space.

init

public void init(PMContext context)
          throws Exception
Description copied from class: BundleDbPersistenceManager
Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded. Initializes the internal structures of this abstract persistence manager.

Specified by:
init in interface PersistenceManager
Overrides:
init in class BundleDbPersistenceManager
Parameters:
context - persistence manager context
Throws:
Exception - if the persistence manager initialization failed

createDbNameIndex

protected DbNameIndex createDbNameIndex()
                                 throws SQLException
Returns a new instance of a NGKDbNameIndex.

Overrides:
createDbNameIndex in class BundleDbPersistenceManager
Returns:
a new instance of a NGKDbNameIndex.
Throws:
SQLException - if an SQL error occurs.

checkTablesWithUser

protected boolean checkTablesWithUser()
Indicates if the user name should be included when retrieving the tables during BundleDbPersistenceManager.checkTablesExist().

Please note that this currently only needs to be changed for oracle based persistence managers.

Overrides:
checkTablesWithUser in class BundleDbPersistenceManager
Returns:
true

createSchemaSQL

protected String createSchemaSQL(String sql)
Creates an SQL statement for schema creation by variable substitution.

Overrides:
createSchemaSQL in class BundleDbPersistenceManager
Parameters:
sql - a SQL string which may contain variables to substitute
Returns:
a valid SQL string

prepareSchemaObjectPrefix

protected void prepareSchemaObjectPrefix()
                                  throws Exception
Since Oracle only supports table names up to 30 characters in length illegal characters are simply replaced with "_" rather than escaping them with "_x0000_".

Overrides:
prepareSchemaObjectPrefix in class BundleDbPersistenceManager
Throws:
Exception - if an error occurs


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.