1 2 24 25 package com.lutris.appserver.server.sessionEnhydra.persistent; 26 27 import java.sql.PreparedStatement ; 28 import java.sql.SQLException ; 29 30 import com.lutris.appserver.server.sql.DBConnection; 31 import com.lutris.appserver.server.sql.Transaction; 32 33 40 public class SessionDeleteDO implements Transaction { 41 42 45 private String sessionKey; 46 47 51 protected SessionDeleteDO(String sessionKey) { 52 this.sessionKey = sessionKey; 53 } 54 55 62 public void executeInsert(DBConnection conn) 63 throws SQLException { 64 throw new Error ("not supported"); 65 } 66 67 77 public void finalizeInsert(boolean success) { 78 } 79 80 87 public void executeUpdate(DBConnection conn) 88 throws SQLException { 89 throw new Error ("not supported"); 90 } 91 92 103 public void finalizeUpdate(boolean success) { 104 } 105 106 113 public void executeDelete(DBConnection conn) 114 throws SQLException { 115 String sql = "delete from " + PersistentSessionHome.dbTableName 116 + " where sessionKey = ?"; 117 PreparedStatement stmt = conn.prepareStatement(sql); 118 stmt.setString(1,sessionKey); 119 conn.executeUpdate(stmt, sql); 120 } 121 122 131 public void finalizeDelete(boolean success) { 132 } 134 135 } 136 | Popular Tags |