Class NGKDbNameIndex
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.pool.DbNameIndex
-
- org.apache.jackrabbit.core.persistence.pool.NGKDbNameIndex
-
- All Implemented Interfaces:
StringIndex
public class NGKDbNameIndex extends DbNameIndex
Same asDbNameIndex
but does not make use of theStatement.RETURN_GENERATED_KEYS
feature as it might not be provided by the underlying database (e.g. oracle).
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.persistence.pool.DbNameIndex
conHelper, indexSelectSQL, nameInsertSQL, nameSelectSQL
-
-
Constructor Summary
Constructors Constructor Description NGKDbNameIndex(ConnectionHelper conHelper, String schemaObjectPrefix)
Creates a new index that is stored in a db.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
init(String schemaObjectPrefix)
Inits this index and prepares the statements.protected int
insertString(String string)
Inserts a string into the database and returns the new index.-
Methods inherited from class org.apache.jackrabbit.core.persistence.pool.DbNameIndex
close, getIndex, getString, indexToString, stringToIndex
-
-
-
-
Constructor Detail
-
NGKDbNameIndex
public NGKDbNameIndex(ConnectionHelper conHelper, String schemaObjectPrefix) throws SQLException
Creates a new index that is stored in a db.- Parameters:
conHelper
- theConnectionHelper
schemaObjectPrefix
- the prefix for table names- Throws:
SQLException
- if the statements cannot be prepared.
-
-
Method Detail
-
init
protected void init(String schemaObjectPrefix) throws SQLException
Inits this index and prepares the statements.- Overrides:
init
in classDbNameIndex
- Parameters:
schemaObjectPrefix
- the prefix for table names- Throws:
SQLException
- if the statements cannot be prepared.
-
insertString
protected int insertString(String string)
Inserts a string into the database and returns the new index.Instead of using the
Statement.RETURN_GENERATED_KEYS
feature, the newly inserted index is retrieved by a 2nd select statement.- Overrides:
insertString
in classDbNameIndex
- Parameters:
string
- the string to insert- Returns:
- the new index.
-
-