|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 @link java.math.BigDecimal value. |
void |
setBigDecimal(java.lang.String ns,
java.lang.String varName,
java.math.BigDecimal value)
To set the specified variable with a @link java.math.BigDecimal value. |
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 @link java.util.Date value. |
void |
setDate(java.lang.String ns,
java.lang.String varName,
java.util.Date value)
To set the specified variable with a @link java.util.Date value. |
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 @link java.io.InputStream value. |
void |
setInputStream(java.lang.String ns,
java.lang.String varName,
java.io.InputStream value,
int length)
To set the specified variable with a @link java.io.InputStream value. |
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 |
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 |
public 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.public 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.public 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.public 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.public void setBigDecimal(java.lang.String ns, java.lang.String varName, java.math.BigDecimal value) throws XMLDBCException
decimal
.
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 @link java.math.BigDecimal that is the value to set for
the variable.
XMLDBCException
- if a data source access error occurs.public void setBigDecimal(java.lang.String varName, java.math.BigDecimal value) throws XMLDBCException
decimal
.
varName
- local name of the external variable. Must not be null.value
- a @link java.math.BigDecimal that is the value to set for
the variable.
XMLDBCException
- if a data source access error occurs.public void setInputStream(java.lang.String ns, java.lang.String varName, java.io.InputStream value, int length) 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
- an input stream.length
- the length of given input stream.
XMLDBCException
- if a data source access error occurs.public void setInputStream(java.lang.String varName, java.io.InputStream value, int length) throws XMLDBCException
Base64Binary
or
HexBinary
.
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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public 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.public void clearVariables() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public boolean execute() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public XMLResultSet executeQuery() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public javax.xml.namespace.QName[] getParameterNames()
public 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 |