Package cz.cvut.kbss.ontodriver
Interface PreparedStatement
- All Superinterfaces:
AutoCloseable
,Statement
- All Known Implementing Classes:
JenaPreparedStatement
,OwlapiPreparedStatement
,Rdf4jPreparedStatement
This interface extends the
Statement
and adds the possibility to parametrize queries
Implementations are also expected to support at least a basic level of character escaping (e.g. quotes) and other injection-protection methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface cz.cvut.kbss.ontodriver.Statement
Statement.StatementOntology
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the currently set parameters.Executes query represented by this statement.void
Executes an update represented by this statement.void
Sets value of binding with the specified name.Methods inherited from interface cz.cvut.kbss.ontodriver.Statement
close, disableInference, executeQuery, executeUpdate, getStatementOntology, isInferenceDisabled, isOpen, useOntology
-
Method Details
-
executeQuery
Executes query represented by this statement.- Returns:
- ResultSet of the query
- Throws:
OntoDriverException
- If an ontology access error occursIllegalStateException
- If called on a closed statement
-
executeUpdate
Executes an update represented by this statement.- Throws:
OntoDriverException
- If an ontology access error occursIllegalStateException
- If called on a closed statement
-
setObject
Sets value of binding with the specified name.- Parameters:
binding
- Binding namevalue
- The value of the parameter- Throws:
OntoDriverException
- If there is no such binding in the statement or some other error occursIllegalStateException
- If called on a closed statement
-
clearParameters
Clears the currently set parameters.- Throws:
OntoDriverException
- If an ontology access error occursIllegalStateException
- If called on a closed statement
-