KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > mainint > db > queries > presentation > SelectPresentationComponent


1 package com.teamkonzept.webman.mainint.db.queries.presentation;
2
3 import java.sql.Connection JavaDoc;
4 import com.teamkonzept.db.*;
5
6 /**
7  * Selects a presentation component.
8  *
9  * @author $Author: uli $
10  * @version $Revision: 1.4 $
11  */

12 public class SelectPresentationComponent
13     extends TKPrepQuery
14 {
15
16     /**
17      * The preparation state.
18      */

19     public final static boolean IS_PREPARED = true;
20
21     /**
22      * The parameter order.
23      */

24     public final static String JavaDoc[] PARAMETER_ORDER = {"PRESENTATION_ID", "PRESENTATION_COMPONENT_IDX"};
25
26     /**
27      * The parameter types.
28      */

29     public final static Object JavaDoc[][] PARAMETER_TYPES = null;
30
31     /**
32      * The relevance state.
33      */

34     public final static boolean[] SET_RELEVANTS = {true};
35
36     /**
37      * The SQL statement.
38      */

39     public final static String JavaDoc SQL_STRING = "SELECT PCM.*, PCT.FORM_ID " +
40                                             "FROM PRESENTATION_COMPONENT PCM, PRESENTATION_CONTENT PCT " +
41                                             "WHERE PCM.PRESENTATION_ID = ? " +
42                                             "AND PCM.PRESENTATION_COMPONENT_IDX = ? " +
43                                             "AND PCM.PRESENTATION_ID = PCT.PRESENTATION_ID " +
44                                             "AND PCM.PRESENTATION_COMPONENT_IDX = PCT.PRESENTATION_COMPONENT_IDX";
45
46     /**
47      * Initializes the query with the given connection.
48      *
49      * @param connection the connection.
50      */

51     public void initQuery (Connection JavaDoc connection)
52     {
53         super.initQuery(connection,
54                         IS_PREPARED,
55                         PARAMETER_ORDER,
56                         PARAMETER_TYPES,
57                         SET_RELEVANTS,
58                         SQL_STRING);
59     }
60
61 }
Popular Tags