1 2 24 25 package com.lutris.appserver.server.sessionEnhydra.persistent; 26 27 import java.sql.PreparedStatement ; 28 import java.sql.ResultSet ; 29 import java.sql.SQLException ; 30 import java.util.Vector ; 31 32 import com.lutris.appserver.server.sql.DBConnection; 33 import com.lutris.appserver.server.sql.ObjectIdException; 34 import com.lutris.appserver.server.sql.Query; 35 36 42 class UnusedQuery implements Query { 43 44 UnusedQuery() { 45 } 46 47 53 public ResultSet executeQuery(DBConnection conn) 54 throws SQLException { 55 String sql = "select sessionKey from " 57 + PersistentSessionHome.dbTableName 58 + " where isNew = ?"; 59 PreparedStatement stmt = conn.prepareStatement(sql); 60 stmt.setString(1, "1"); 61 return conn.executeQuery(stmt, sql); 62 } 63 64 72 public Object next(ResultSet rs) throws SQLException { 73 Vector v = new Vector (); 74 if (rs.next()) { 75 return rs.getString("sessionKey"); 76 } 77 return null; 78 } 79 80 } 81 | Popular Tags |