[#1142] Rename Result.exportXML() to Result.intoXML() to stay more consistent

This commit is contained in:
Lukas Eder 2012-02-15 17:59:02 +00:00
parent 4bd3feea8d
commit 95e04de914
4 changed files with 20 additions and 5 deletions

View File

@ -243,9 +243,9 @@ extends BaseTest<A, B, S, B2S, BS, L, X, D, T, U, I, IPK, T658, T725, T639, T785
}
@Test
public void testExportXML() throws Exception {
public void testIntoXML() throws Exception {
Result<B> books = create().selectFrom(TBook()).fetch();
testXML(books.exportXML(), books);
testXML(books.intoXML(), books);
}
private void testXML(Document doc, Result<B> books) throws XPathExpressionException {

View File

@ -1007,8 +1007,8 @@ public abstract class jOOQAbstractTest<
}
@Test
public void testExportXML() throws Exception {
new FormatTests(this).testExportXML();
public void testIntoXML() throws Exception {
new FormatTests(this).testIntoXML();
}
@Test

View File

@ -1721,6 +1721,14 @@ public interface Result<R extends Record> extends FieldProvider, List<R>, Attach
*/
String formatXML();
/**
* Get this result as XML
*
* @deprecated - 2.0.5 - Use {@link #intoXML()} instead
*/
@Deprecated
Document exportXML();
/**
* Get this result as XML
*
@ -1728,7 +1736,7 @@ public interface Result<R extends Record> extends FieldProvider, List<R>, Attach
* @see <a
* href="http://www.jooq.org/xsd/jooq-export-1.6.2.xsd">http://www.jooq.org/xsd/jooq-export-1.6.2.xsd</a>
*/
Document exportXML();
Document intoXML();
/**
* Convert this result into an array of arrays
@ -1788,4 +1796,6 @@ public interface Result<R extends Record> extends FieldProvider, List<R>, Attach
*/
<H extends RecordHandler<R>> H into(H handler);
}

View File

@ -1185,6 +1185,11 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
@Override
public final Document exportXML() {
return intoXML();
}
@Override
public final Document intoXML() {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();