Skip to content

Commit 00c744b

Browse files
XaerxessPhillip Webb
authored and
Phillip Webb
committed
Fix malformed code in documentation
Fixed code snippets in "Handling complex types for stored procedure calls" paragraph. Issue: SPR-10798
1 parent c93fbda commit 00c744b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/reference/docbook/jdbc.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,19 +2601,19 @@ clobReader.close();]]></programlisting>
26012601
that must be implemented. This interface is used as part of the
26022602
declaration of an <classname>SqlOutParameter</classname>.</para>
26032603

2604-
<para><programlisting language="java">final TestItem - new TestItem(123L, "A test item",
2605-
new SimpleDateFormat("yyyy-M-d").parse("2010-12-31"););
2604+
<para><programlisting language="java">final TestItem = new TestItem(123L, "A test item",
2605+
new SimpleDateFormat("yyyy-M-d").parse("2010-12-31"));
26062606

26072607
declareParameter(new SqlOutParameter("item", OracleTypes.STRUCT, "ITEM_TYPE",
26082608
new SqlReturnType() {
26092609
public Object getTypeValue(CallableStatement cs, int colIndx, int sqlType, String typeName)
26102610
throws SQLException {
2611-
STRUCT struct = (STRUCT)cs.getObject(colIndx);
2611+
STRUCT struct = (STRUCT) cs.getObject(colIndx);
26122612
Object[] attr = struct.getAttributes();
26132613
TestItem item = new TestItem();
26142614
item.setId(((Number) attr[0]).longValue());
2615-
item.setDescription((String)attr[1]);
2616-
item.setExpirationDate((java.util.Date)attr[2]);
2615+
item.setDescription((String) attr[1]);
2616+
item.setExpirationDate((java.util.Date) attr[2]);
26172617
return item;
26182618
}
26192619
}));</programlisting>You use the <classname>SqlTypeValue</classname> to
@@ -2626,8 +2626,8 @@ declareParameter(new SqlOutParameter("item", OracleTypes.STRUCT, "ITEM_TYPE",
26262626
<classname>StructDescriptor</classname>s, as shown in the following
26272627
example, or <classname>ArrayDescriptor</classname>s.<!--Rewording of preceding ok? The example is showing human participation, I assume. ;-) TR: Yes :), OK.--></para>
26282628

2629-
<para><programlisting language="java">final TestItem - new TestItem(123L, "A test item",
2630-
new SimpleDateFormat("yyyy-M-d").parse("2010-12-31"););
2629+
<para><programlisting language="java">final TestItem = new TestItem(123L, "A test item",
2630+
new SimpleDateFormat("yyyy-M-d").parse("2010-12-31"));
26312631

26322632
SqlTypeValue value = new AbstractSqlTypeValue() {
26332633
protected Object createTypeValue(Connection conn, int sqlType, String typeName) throws SQLException {

0 commit comments

Comments
 (0)