1 43 package net.jforum.dao.sqlserver; 44 45 import java.sql.PreparedStatement ; 46 import java.sql.ResultSet ; 47 48 import net.jforum.JForumExecutionContext; 49 import net.jforum.entities.PrivateMessage; 50 import net.jforum.util.preferences.SystemGlobals; 51 52 56 public class SqlServerPrivateMessageDAO extends net.jforum.dao.generic.GenericPrivateMessageDAO 57 { 58 61 public PrivateMessage selectById(PrivateMessage pm) throws Exception 62 { 63 PreparedStatement p = null; 64 p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.selectById"), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); 65 66 p.setInt(1, pm.getId()); 67 68 ResultSet rs = null; 69 rs = p.executeQuery(); 70 if (rs.next()) { 71 pm = this.getPm(rs); 72 } 73 74 rs.close(); 75 p.close(); 76 77 return pm; 78 } 79 80 } 81 | Popular Tags |