1 43 package net.jforum.dao.oracle; 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 OraclePrivateMessageDAO extends net.jforum.dao.generic.GenericPrivateMessageDAO 57 { 58 61 protected void addPmText(PrivateMessage pm) throws Exception 62 { 63 PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( 64 SystemGlobals.getSql("PrivateMessagesModel.addText")); 65 p.setInt(1, pm.getId()); 66 p.executeUpdate(); 67 p.close(); 68 69 OracleUtils.writeBlobUTF16BinaryStream(SystemGlobals.getSql("PrivateMessagesModel.addTextField"), 70 pm.getId(), pm.getPost().getText()); 71 } 72 73 76 protected String getPmText(ResultSet rs) throws Exception 77 { 78 return OracleUtils.readBlobUTF16BinaryStream(rs, "privmsgs_text"); 79 } 80 } 81 | Popular Tags |