?? scoreitemsquery.java
字號:
package com.itsv.gankao.database;import java.sql.*;import java.util.*;import com.itsv.gankao.common.*;public class ScoreItemsQuery extends Query { public ScoreItemsQuery() { } public void searchByPersonId(Connection conn, String periodId, String personId) throws SQLException{ String sql = "SELECT * FROM " + ScoreItemsTable.TABLE_NAME + " WHERE " + ScoreItemsTable.FULL_COL_PERSON_ID + " = " + "'" + personId + "'" + " AND " + ScoreItemsTable.FULL_COL_PERIOD_ID + "=?"; PreparedStatement statement = conn.prepareStatement(sql); long lPeriodId = new Long(periodId).longValue(); long lPersonId = new Long(personId).longValue();// statement.setString(1, personId); statement.setLong(1, lPeriodId); statement_ = statement; result_ = statement.executeQuery();} public String getName() throws SQLException{ return result_.getString(ScoreItemsTable.COL_NAME); } public String getTvalue() throws SQLException{ return new Double(result_.getDouble(ScoreItemsTable.COL_TVALUE)).toString(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -