KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > content > db > queries > XMLContentDelete


1 package de.webman.content.db.queries;
2
3 import java.sql.Connection JavaDoc;
4 import java.sql.Types JavaDoc;
5 import com.teamkonzept.db.TKPrepQuery;
6 import de.webman.content.db.ContentConstants;
7
8 /**
9  * Inserts a new content into the database.
10  * <TABLE>
11  * <TR>
12  * <TD><B>Order</B></TD>
13  * <TD><B>Name</B></TD>
14  * <TD><B>Type</B></TD>
15  * </TR>
16  * <TR>
17  * <TD COLSPAN="3"><I>Parameters<I/></TD>
18  * </TR>
19  * <TR>
20  * <TD><TT>1</TT></TD>
21  * <TD><TT>de.webman.content.db.ContentConstants.CONTENT_ID</TT></TD>
22  * <TD><TT>java.lang.Integer</TT></TD>
23  * </TR>
24  * </TABLE>
25  *
26  * @author <A HREF="mailto:unl@webman.de">Ulrich Nicolas Liss&eacute;</A>,
27  * &copy; 2001 Webman AG.
28  * @version $Revision: 1.1 $
29  */

30 public class XMLContentDelete
31     extends TKPrepQuery
32 {
33     // $Id: XMLContentDelete.java,v 1.1 2001/09/05 17:04:18 uli Exp $
34

35     // Constants.
36

37     /**
38      * The preparation state.
39      */

40     private final static boolean IS_PREPARED = true;
41
42     /**
43      * The parameter order.
44      */

45     private final static String JavaDoc[] PARAMETER_ORDER =
46     {
47         ContentConstants.CONTENT_ID
48     };
49
50     /**
51      * The parameter types.
52      */

53     private final static Object JavaDoc[][] PARAMETER_TYPES =
54     {
55         {ContentConstants.CONTENT_ID, new Integer JavaDoc(Types.INTEGER)}
56     };
57
58     /**
59      * The relevance state.
60      */

61     private final static boolean[] SET_RELEVANTS =
62     {
63         false
64     };
65
66     /**
67      * The SQL statement.
68      */

69     private final static String JavaDoc SQL_STRING = "DELETE FROM CONTENT WHERE CONTENT_ID = ?";
70
71
72     // Implementation of 'com.teamkonzept.db.TKQuery'
73

74     /**
75      * Initializes the query with the given connection.
76      *
77      * @param connection the connection.
78      */

79     public void initQuery (Connection JavaDoc connection)
80     {
81         super.initQuery(connection,
82                         IS_PREPARED,
83                         PARAMETER_ORDER,
84                         PARAMETER_TYPES,
85                         SET_RELEVANTS,
86                         SQL_STRING);
87     }
88
89 }
90
Popular Tags