/*
* SqlInputSource.java
*
* Created on April 29, 2007, 5:24 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package com.arpu.opencds.datatransformation;
import java.sql.ResultSet;
import org.xml.sax.InputSource;
/**
* a class that extends InputSource.
* The intent of this class is to just holds a copy of the ResultSet object
* for the XML reader to use it.
* @author aabdelaziz
* http://www.aliabdelaziz.com/
*/
public class SqlInputSource extends InputSource {
/**
* Zero-argument default constructor.
*
* @see #setPublicId
* @see #setSystemId
* @see #setByteStream
* @see #setCharacterStream
* @see #setEncoding
* @see #setResultSet
*/
public SqlInputSource() {
super();
}
/**
* Create a new sql input source with a system identifier.
*
*
Applications may use setResultSet to include a
* public identifier as well.
*
*
...
* ... .
*
* @param resultSet The Result Set.
* @see #setResultSet
*/
public SqlInputSource (ResultSet resultSet)
{
setResultSet(resultSet);
}
/**
* Set the result set for this input source.
*
*
The SAX parser will ignore this if there is also a character
* stream specified, but it will use a byte stream in preference
* to opening a URI connection itself.
*
*
If the application knows the character resultSet of the
* ... , it should set it with the setEncoding method.
*
* @param resultSet A ResultSet containing an SQL resultSet query
* @see #getResultSet
* @see java.io.InputStream
*/
public void setResultSet (ResultSet resultSet)
{
this.resultSet = resultSet;
}
/**
* Get the Result Set for this sql input source.
*
*
The getEncoding method will return the character
* encoding for this byte stream, or null if unknown.
*
* @return The resultSet, or null if none was supplied.
* @see #setResultSet
*/
public ResultSet getResultSet() {
return resultSet;
}
////////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////////
private ResultSet resultSet;
}

Recent comments
10 weeks 4 days ago
10 weeks 6 days ago
10 weeks 6 days ago
22 weeks 1 day ago
26 weeks 3 days ago
27 weeks 4 days ago
47 weeks 2 days ago
47 weeks 2 days ago
51 weeks 1 day ago
1 year 10 weeks ago