|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PreparedXMLStatement
This prepared statement interface is used for executing parameterized XQuery or XPath prepared statements, setting
external variables and obtaining the results (update statements are not supported yet).
Prepared statements allow queries precompilation by the driver.
In order to binds external variables, two kinds of methods are available:
setExternalVariable(String, String, String)
assumes that the value be parsed and validated.
Method Summary | |
---|---|
void |
clearVariables()
Clears the current parameters values immediately. |
boolean |
execute()
Executes the query statement specified when this object was built with the prepareStatement method (see XMLConnection interface) that may return results. |
XMLResultSet |
executeQuery()
Executes the query statement specified when this object was built with the prepareStatement method (see XMLConnection interface) that returns results. |
javax.xml.namespace.QName[] |
getParameterNames()
Gets the array of parameter names of the statement |
javax.xml.namespace.QName |
getParameterType(javax.xml.namespace.QName varName)
Gets the schema type of a particular parameter given it's name |
void |
setBigDecimal(java.lang.String varName,
java.math.BigDecimal value)
To set the specified variable with a |
void |
setBigDecimal(java.lang.String ns,
java.lang.String varName,
java.math.BigDecimal value)
To set the specified variable with a |
void |
setBoolean(java.lang.String varName,
boolean value)
To set the specified variable with a boolean value. |
void |
setBoolean(java.lang.String ns,
java.lang.String varName,
boolean value)
To set the specified variable with a boolean value. |
void |
setBytes(java.lang.String varName,
byte[] value)
To set the specified variable with a byte array value. |
void |
setBytes(java.lang.String ns,
java.lang.String varName,
byte[] value)
To set the specified variable with a byte array value. |
void |
setDate(java.lang.String varName,
java.util.Date value)
To set the specified variable with a |
void |
setDate(java.lang.String ns,
java.lang.String varName,
java.util.Date value)
To set the specified variable with a |
void |
setDouble(java.lang.String varName,
double value)
To set the specified variable with a double value. |
void |
setDouble(java.lang.String ns,
java.lang.String varName,
double value)
To set the specified variable with a double value. |
void |
setExternalVariable(java.lang.String varName,
java.lang.String value)
Binds the specified external variable to the current query of the statement. |
void |
setExternalVariable(java.lang.String ns,
java.lang.String varName,
java.lang.String value)
Binds the specified external variable to the current query of the statement. |
void |
setFloat(java.lang.String varName,
float value)
To set the specified variable with a float value. |
void |
setFloat(java.lang.String ns,
java.lang.String varName,
float value)
To set the specified variable with a float value. |
void |
setInputStream(java.lang.String varName,
java.io.InputStream value,
int length)
To set the specified variable with a |
void |
setInputStream(java.lang.String ns,
java.lang.String varName,
java.io.InputStream value,
int length)
To set the specified variable with a |
void |
setLong(java.lang.String varName,
long value)
To set the specified variable with a long value. |
void |
setLong(java.lang.String ns,
java.lang.String varName,
long value)
To set the specified variable with a long value. |
void |
setObject(java.lang.String varName,
java.lang.Object value)
To set the specified variable with a value inside an object. |
void |
setObject(java.lang.String ns,
java.lang.String varName,
java.lang.Object value)
To set the specified variable with a value inside an object. |
void |
setSequence(java.lang.String varName,
java.util.List value)
To set the specified variable with a Sequence value. |
void |
setSequence(java.lang.String ns,
java.lang.String varName,
java.util.List value)
To set the specified variable with a Sequence value. |
void |
setSource(java.lang.String varName,
javax.xml.transform.Source source)
To set the specified variable with a value inside a Source. |
void |
setSource(java.lang.String ns,
java.lang.String varName,
javax.xml.transform.Source source)
To set the specified variable with a value inside a Source. |
void |
setString(java.lang.String varName,
java.lang.String value)
To set the specified variable with a String value. |
void |
setString(java.lang.String ns,
java.lang.String varName,
java.lang.String value)
To set the specified variable with a String value. |
Methods inherited from interface org.xquark.xml.xdbc.XMLStatement |
---|
close, execute, execute, executeDocumentQuery, executeQuery, executeQuery, getBaseURI, getConnection, getDocumentSet, getResultSet, setBaseURI |
Method Detail |
---|
void setExternalVariable(java.lang.String ns, java.lang.String varName, java.lang.String value) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a string that is the value to set for the variable.
XMLDBCException
- if a data source access error occurs.void setExternalVariable(java.lang.String varName, java.lang.String value) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- a string that is the value to set for the variable.
XMLDBCException
- if a data source access error occurs.void setSource(java.lang.String ns, java.lang.String varName, javax.xml.transform.Source source) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.source
- a Source that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setSource(java.lang.String varName, javax.xml.transform.Source source) throws XMLDBCException
varName
- local name of the external variable. Must not be null.source
- a Source that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setObject(java.lang.String ns, java.lang.String varName, java.lang.Object value) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- an object that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setObject(java.lang.String varName, java.lang.Object value) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- an object that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setBigDecimal(java.lang.String ns, java.lang.String varName, java.math.BigDecimal value) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a
XMLDBCException
- if a data source access error occurs.void setBigDecimal(java.lang.String varName, java.math.BigDecimal value) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- a
XMLDBCException
- if a data source access error occurs.void setInputStream(java.lang.String ns, java.lang.String varName, java.io.InputStream value, int length) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- an input stream.length
- the length of given input stream.
XMLDBCException
- if a data source access error occurs.void setInputStream(java.lang.String varName, java.io.InputStream value, int length) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- an input stream.length
- the length of given input stream.
XMLDBCException
- if a data source access error occurs.void setBytes(java.lang.String ns, java.lang.String varName, byte[] value) throws XMLDBCException
Base64Binary
or HexBinary
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a byte array that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setBytes(java.lang.String varName, byte[] value) throws XMLDBCException
Base64Binary
or HexBinary
.
varName
- local name of the external variable. Must not be null.value
- a byte array that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setBoolean(java.lang.String ns, java.lang.String varName, boolean value) throws XMLDBCException
boolean
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a boolean that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setBoolean(java.lang.String varName, boolean value) throws XMLDBCException
boolean
.
varName
- local name of the external variable. Must not be null.value
- a boolean that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setDate(java.lang.String ns, java.lang.String varName, java.util.Date value) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a java.sql.Date that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setDate(java.lang.String varName, java.util.Date value) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- a java.sql.Date that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setDouble(java.lang.String ns, java.lang.String varName, double value) throws XMLDBCException
double
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a double that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setDouble(java.lang.String varName, double value) throws XMLDBCException
double
.
varName
- local name of the external variable. Must not be null.value
- a double that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setFloat(java.lang.String ns, java.lang.String varName, float value) throws XMLDBCException
float
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a float that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setFloat(java.lang.String varName, float value) throws XMLDBCException
float
.
varName
- local name of the external variable. Must not be null.value
- a float that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setLong(java.lang.String ns, java.lang.String varName, long value) throws XMLDBCException
integer
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a long that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setLong(java.lang.String varName, long value) throws XMLDBCException
integer
.
varName
- local name of the external variable. Must not be null.value
- a long that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setString(java.lang.String ns, java.lang.String varName, java.lang.String value) throws XMLDBCException
string
.
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a string that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setString(java.lang.String varName, java.lang.String value) throws XMLDBCException
string
.
varName
- local name of the external variable. Must not be null.value
- a string that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setSequence(java.lang.String ns, java.lang.String varName, java.util.List value) throws XMLDBCException
ns
- The namespace of the external variable. Possibly an empty string if the variable has no namespace.varName
- local name of the external variable. Must not be null.value
- a Sequence that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void setSequence(java.lang.String varName, java.util.List value) throws XMLDBCException
varName
- local name of the external variable. Must not be null.value
- a Sequence that is the value to set for the parameter.
XMLDBCException
- if a data source access error occurs.void clearVariables() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.boolean execute() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.XMLResultSet executeQuery() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.javax.xml.namespace.QName[] getParameterNames()
javax.xml.namespace.QName getParameterType(javax.xml.namespace.QName varName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |