org.apache.jackrabbit.core.util.db
Class OracleConnectionHelper

java.lang.Object
  extended by org.apache.jackrabbit.core.util.db.ConnectionHelper
      extended by org.apache.jackrabbit.core.util.db.OracleConnectionHelper
Direct Known Subclasses:
Oracle10R1ConnectionHelper

public class OracleConnectionHelper
extends ConnectionHelper

The connection helper for Oracle databases of version 10.2 and later.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
ConnectionHelper.RetryManager<T>
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
dataSource
 
Constructor Summary
OracleConnectionHelper(DataSource dataSrc, boolean block)
           
 
Method Summary
 void init()
          Initializes the helper: checks for valid driver version.
protected  void replaceCharacter(StringBuffer escaped, char c)
          Since Oracle only supports table names up to 30 characters in length illegal characters are simply replaced with "_" rather than escaping them with "_x0000_".
 
Methods inherited from class org.apache.jackrabbit.core.util.db.ConnectionHelper
closeResources, endBatch, exec, exec, execute, getConnection, inBatchMode, prepareDbIdentifier, startBatch, tableExists, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleConnectionHelper

public OracleConnectionHelper(DataSource dataSrc,
                              boolean block)
Parameters:
dataSrc - the DataSource on which this helper acts
block - whether to block on connection loss until the db is up again
Method Detail

init

public void init()
          throws Exception
Initializes the helper: checks for valid driver version. Subclasses that override this method should still call it!

Throws:
Exception - on error

replaceCharacter

protected final void replaceCharacter(StringBuffer escaped,
                                      char c)
Since Oracle only supports table names up to 30 characters in length illegal characters are simply replaced with "_" rather than escaping them with "_x0000_". Called from ConnectionHelper.prepareDbIdentifier(String). Default implementation replaces the illegal characters with their hexadecimal encoding.

Overrides:
replaceCharacter in class ConnectionHelper
Parameters:
escaped - the escaped db identifier
c - the character to replace


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