From c890d1e69d6b718857e6844cac7f7c80b67ec9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Ro=C5=BCniecki?= Date: Tue, 30 Jul 2013 19:10:06 +0200 Subject: [PATCH] Fix malformed code in documentation Fixed code snippets in "Handling complex types for stored procedure calls" paragraph. Issue: SPR-10798 (cherry picked from commit 00c744b) --- src/reference/docbook/jdbc.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/reference/docbook/jdbc.xml b/src/reference/docbook/jdbc.xml index 65b238e985..6b3ae4601b 100644 --- a/src/reference/docbook/jdbc.xml +++ b/src/reference/docbook/jdbc.xml @@ -2601,19 +2601,19 @@ clobReader.close();]]> that must be implemented. This interface is used as part of the declaration of an SqlOutParameter. - final TestItem - new TestItem(123L, "A test item", - new SimpleDateFormat("yyyy-M-d").parse("2010-12-31");); + final TestItem = new TestItem(123L, "A test item", + new SimpleDateFormat("yyyy-M-d").parse("2010-12-31")); declareParameter(new SqlOutParameter("item", OracleTypes.STRUCT, "ITEM_TYPE", new SqlReturnType() { public Object getTypeValue(CallableStatement cs, int colIndx, int sqlType, String typeName) throws SQLException { - STRUCT struct = (STRUCT)cs.getObject(colIndx); + STRUCT struct = (STRUCT) cs.getObject(colIndx); Object[] attr = struct.getAttributes(); TestItem item = new TestItem(); item.setId(((Number) attr[0]).longValue()); - item.setDescription((String)attr[1]); - item.setExpirationDate((java.util.Date)attr[2]); + item.setDescription((String) attr[1]); + item.setExpirationDate((java.util.Date) attr[2]); return item; } }));You use the SqlTypeValue to @@ -2626,8 +2626,8 @@ declareParameter(new SqlOutParameter("item", OracleTypes.STRUCT, "ITEM_TYPE", StructDescriptors, as shown in the following example, or ArrayDescriptors. - final TestItem - new TestItem(123L, "A test item", - new SimpleDateFormat("yyyy-M-d").parse("2010-12-31");); + final TestItem = new TestItem(123L, "A test item", + new SimpleDateFormat("yyyy-M-d").parse("2010-12-31")); SqlTypeValue value = new AbstractSqlTypeValue() { protected Object createTypeValue(Connection conn, int sqlType, String typeName) throws SQLException {