1 32 33 package com.knowgate.addrbook; 34 35 import java.sql.SQLException ; 36 import java.sql.PreparedStatement ; 37 38 import com.knowgate.debug.DebugFile; 39 import com.knowgate.jdc.JDCConnection; 40 import com.knowgate.dataobjs.DB; 41 import com.knowgate.dataobjs.DBPersist; 42 43 47 48 public class FellowTitle extends DBPersist { 49 50 public FellowTitle() { 51 super(DB.k_lu_fellow_titles, "FellowTitle"); 52 } 53 54 public FellowTitle(String sIdWorkArea, String sDeTitle) { 55 super(DB.k_lu_fellow_titles, "FellowTitle"); 56 57 put (DB.gu_workarea, sIdWorkArea); 58 put (DB.de_title, sDeTitle); 59 } 60 61 public boolean delete(JDCConnection oConn) throws SQLException { 62 PreparedStatement oStmt; 63 String sSQL = "UPDATE " + DB.k_lu_fellow_titles + " SET " + DB.id_boss + "=NULL WHERE " + DB.id_boss + "=?"; 64 65 if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(" + sSQL + ")"); 66 67 oStmt = oConn.prepareStatement(sSQL); 68 oStmt.setString(1, getString(DB.de_title)); 69 oStmt.executeUpdate(); 70 oStmt.close(); 71 72 return super.delete(oConn); 73 } 75 } | Popular Tags |