1 package de.webman.content.db.queries; 2 3 import java.sql.Connection ; 4 import java.sql.Types ; 5 import com.teamkonzept.db.TKPrepQuery; 6 import de.webman.content.db.ContentConstants; 7 8 35 public class UpdateContent 36 extends TKPrepQuery 37 { 38 40 42 45 private final static boolean IS_PREPARED = true; 46 47 50 private final static String [] PARAMETER_ORDER = 51 { 52 ContentConstants.XML_TEXT, 53 ContentConstants.CONTENT_ID 54 }; 55 56 59 private final static Object [][] PARAMETER_TYPES = 60 { 61 {ContentConstants.XML_TEXT, new Integer (Types.VARCHAR)}, 62 {ContentConstants.CONTENT_ID, new Integer (Types.INTEGER)} 63 }; 64 65 68 private final static boolean[] SET_RELEVANTS = 69 { 70 false 71 }; 72 73 76 private final static String SQL_STRING = (new StringBuffer ()).append("UPDATE CONTENT SET XML_TEXT = ? WHERE CONTENT_ID = ?").toString(); 77 78 79 81 86 public void initQuery (Connection connection) 87 { 88 super.initQuery(connection, 89 IS_PREPARED, 90 PARAMETER_ORDER, 91 PARAMETER_TYPES, 92 SET_RELEVANTS, 93 SQL_STRING); 94 } 95 96 } 97 | Popular Tags |