Revision 162
Added by bojilova almost 24 years ago
DBSAXNode.java | ||
---|---|---|
82 | 82 |
if (nodetype == "ELEMENT") { |
83 | 83 |
pstmt.setLong(3, getParentID()); |
84 | 84 |
pstmt.setLong(4, getRootNodeID()); |
85 |
pstmt.setLong(5, getDocID());
|
|
85 |
pstmt.setString(5, getDocID());
|
|
86 | 86 |
pstmt.setString(6, data); |
87 | 87 |
pstmt.setInt(7, getNodeIndex()); |
88 | 88 |
} else { |
89 | 89 |
pstmt.setLong(3, getNodeID()); |
90 | 90 |
pstmt.setLong(4, getRootNodeID()); |
91 |
pstmt.setLong(5, getDocID());
|
|
91 |
pstmt.setString(5, getDocID());
|
|
92 | 92 |
pstmt.setString(6, data); |
93 | 93 |
pstmt.setInt(7, incChildNum()); |
94 | 94 |
} |
... | ... | |
151 | 151 |
* creates SQL code to put doc ID for the document node and for comment/PI nodes under document node |
152 | 152 |
* into DB connection |
153 | 153 |
*/ |
154 |
public void writeDocID(long doc_id) {
|
|
154 |
public void writeDocID(String doc_id) {
|
|
155 | 155 |
try { |
156 | 156 |
PreparedStatement pstmt; |
157 | 157 |
pstmt = conn.prepareStatement( |
... | ... | |
159 | 159 |
"WHERE nodeid = ?"); |
160 | 160 |
|
161 | 161 |
// Bind the values to the query |
162 |
pstmt.setLong(1, doc_id);
|
|
162 |
pstmt.setString(1, doc_id);
|
|
163 | 163 |
pstmt.setLong(2, getNodeID()); |
164 | 164 |
// Do the insertion |
165 | 165 |
pstmt.execute(); |
... | ... | |
170 | 170 |
"UPDATE xml_nodes set docid = ? " + |
171 | 171 |
"WHERE parentnodeid = ?"); |
172 | 172 |
// Bind the values to the query |
173 |
pstmt.setLong(1, doc_id);
|
|
173 |
pstmt.setString(1, doc_id);
|
|
174 | 174 |
pstmt.setLong(2, getNodeID()); |
175 | 175 |
// Do the insertion |
176 | 176 |
pstmt.execute(); |
Also available in: Unified diff
docid is String