public class XmlExportTransformer extends Session.AbstractResultSetReader
Session.ResultSetReader that writes the read rows into an XML file.| Modifier and Type | Class and Description |
|---|---|
class |
XmlExportTransformer.TableMapping
Holds XML mapping information.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
numberOfExportedEntities
Counts the exported entities.
|
static long |
numberOfExportedLOBs
Counts the exported LOBs.
|
| Constructor and Description |
|---|
XmlExportTransformer(OutputStream out,
String commentHeader,
EntityGraph entityGraph,
Set<Table> totalProgress,
Set<Table> cyclicAggregatedTables,
String rootTag,
String datePattern,
String timestampPattern,
Session session,
Charset charset,
ExecutionContext executionContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Flushes the export-reader.
|
void |
endDocument()
Closes the XML document.
|
XmlExportTransformer.TableMapping |
getTableMapping(Table table)
Gets the xml mapping for a table.
|
void |
readCurrentRow(ResultSet resultSet)
Reads result-set and writes into export-script.
|
void |
setTable(Table table)
Sets the table to read from.
|
getCellContentConverter, getMetaDatapublic static long numberOfExportedEntities
public static long numberOfExportedLOBs
public XmlExportTransformer(OutputStream out, String commentHeader, EntityGraph entityGraph, Set<Table> totalProgress, Set<Table> cyclicAggregatedTables, String rootTag, String datePattern, String timestampPattern, Session session, Charset charset, ExecutionContext executionContext) throws TransformerConfigurationException, SAXException, SQLException
out - to write the xml intocommentHeader - comment at top of documententityGraph - the entity graphtotalProgress - set of all tables for which entities exist in entityGraphrootTag - root tag namedatePattern - pattern for datestimestampPattern - pattern for time-stampsSQLExceptionTransformerConfigurationExceptionSAXExceptionpublic void readCurrentRow(ResultSet resultSet) throws SQLException
resultSet - the result-setSQLExceptionpublic void setTable(Table table)
public void endDocument()
throws SAXException
SAXExceptionpublic void close()
close in interface Session.ResultSetReaderclose in class Session.AbstractResultSetReaderpublic XmlExportTransformer.TableMapping getTableMapping(Table table) throws SAXException, IOException
table - the tableSAXExceptionIOException