Class PassXML.SQLXMLProxy
- java.lang.Object
-
- org.postgresql.pljava.example.annotation.PassXML.SQLXMLProxy
-
- All Implemented Interfaces:
SQLXML
- Enclosing class:
- PassXML
public static class PassXML.SQLXMLProxy extends Object implements SQLXML
Class that will proxy methods to anotherSQLXML
class.Used for testing the PL/Java can accept input for PostgreSQL from an
SQLXML
object not of its own implementation (for example, one obtained from a different JDBC driver from some other database).Only the
getSource
method is specially treated, to allow exercising the various flavors of source.
-
-
Constructor Summary
Constructors Constructor Description SQLXMLProxy(SQLXML sx, int how)
-
Method Summary
Modifier and Type Method Description void
free()
InputStream
getBinaryStream()
Reader
getCharacterStream()
<T extends Source>
TgetSource(Class<T> sourceClass)
String
getString()
OutputStream
setBinaryStream()
Writer
setCharacterStream()
<T extends Result>
TsetResult(Class<T> resultClass)
void
setString(String value)
-
-
-
Constructor Detail
-
SQLXMLProxy
public SQLXMLProxy(SQLXML sx, int how)
-
-
Method Detail
-
free
public void free() throws SQLException
- Specified by:
free
in interfaceSQLXML
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream() throws SQLException
- Specified by:
getBinaryStream
in interfaceSQLXML
- Throws:
SQLException
-
setBinaryStream
public OutputStream setBinaryStream() throws SQLException
- Specified by:
setBinaryStream
in interfaceSQLXML
- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream() throws SQLException
- Specified by:
getCharacterStream
in interfaceSQLXML
- Throws:
SQLException
-
setCharacterStream
public Writer setCharacterStream() throws SQLException
- Specified by:
setCharacterStream
in interfaceSQLXML
- Throws:
SQLException
-
getString
public String getString() throws SQLException
- Specified by:
getString
in interfaceSQLXML
- Throws:
SQLException
-
setString
public void setString(String value) throws SQLException
- Specified by:
setString
in interfaceSQLXML
- Throws:
SQLException
-
getSource
public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException
- Specified by:
getSource
in interfaceSQLXML
- Throws:
SQLException
-
setResult
public <T extends Result> T setResult(Class<T> resultClass) throws SQLException
- Specified by:
setResult
in interfaceSQLXML
- Throws:
SQLException
-
-