Class CheckSchemaOperation
java.lang.Object
org.apache.jackrabbit.core.util.db.CheckSchemaOperation
An operation which synchronously checks the DB schema in the
run() method. The
addVariableReplacement(String, String) method return the instance to enable method chaining.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCheckSchemaOperation(ConnectionHelper connectionhelper, InputStream ddlStream, String tableName) -
Method Summary
Modifier and TypeMethodDescriptionaddVariableReplacement(String var, String replacement) Adds a variable replacement mapping.voidrun()Checks if the required schema objects exist and creates them if they don't exist yet.
-
Field Details
-
SCHEMA_OBJECT_PREFIX_VARIABLE
- See Also:
-
TABLE_SPACE_VARIABLE
- See Also:
-
-
Constructor Details
-
CheckSchemaOperation
public CheckSchemaOperation(ConnectionHelper connectionhelper, InputStream ddlStream, String tableName) - Parameters:
connectionhelper- the connection helperddlStream- the stream of the DDL to use to create the schema if necessary (closed by therun()method)tableName- the name of the table to use for the schema-existence-check
-
-
Method Details
-
addVariableReplacement
Adds a variable replacement mapping.- Parameters:
var- the variablereplacement- the replacement value- Returns:
- this
-
run
Checks if the required schema objects exist and creates them if they don't exist yet.- Throws:
SQLException- if an error occursIOException- if an error occurs
-