KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > mainint > db > queries > TKDBDocContentDRGet


1 /*
2  * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/mainint/db/queries/Attic/TKDBDocContentDRGet.java,v 1.7 2001/11/09 13:32:39 markus Exp $
3  *
4  */

5 package com.teamkonzept.webman.mainint.db.queries;
6
7 import java.sql.*;
8
9 import com.teamkonzept.db.*;
10
11 /*
12  * TKDBDocContentDRGet
13  * Holt alle Document References eines Site-Document-Knotens
14  *
15  * Input: PRESENTATION_ID, SITE_NODE_ID, SITE_NODE_DOC_IDX
16  * Output: alles aus PRESENT_COM, PRES_CON
17  *
18  * @author
19  * @version
20  */

21 public class TKDBDocContentDRGet extends TKPrepQuery{
22
23     public final static boolean ISPREPARED =
24         true;
25     
26     public final static String JavaDoc[] PARAMORDER =
27         { "PRESENTATION_ID", "SITE_NODE_ID", "SITE_NODE_DOC_IDX"};
28     
29     public final static Object JavaDoc[][] PARAMTYPES =
30         null;
31                 
32     public final static boolean[] SETRELEVANTS =
33         { true };
34         
35     public final static String JavaDoc SQLSTRING =
36          
37         "SELECT DR.*, ST.SITE_NODE_NAME AS DEST_SITE_NODE_NAME, " +
38         " ST.SITE_NODE_SHORTNAME AS DEST_SITE_NODE_SHORTNAME " +
39         "FROM PRESENTATION_COMPONENT PM, DOCUMENT_REFERENCE DR, SITE_TREE ST " +
40         "WHERE PM.PRESENTATION_ID = ? AND PM.COMPONENT_TYPE BETWEEN 1 AND 2 " +
41         " AND DR.SRC_SITE_NODE_ID = ? AND DR.SRC_SITE_NODE_DOC_IDX = ? " +
42         " AND DR.SRC_PRESENTATION_COMPONENT_IDX = PM.PRESENTATION_COMPONENT_IDX " +
43         " AND DR.DEST_SITE_NODE_ID = ST.SITE_NODE_ID " +
44         "ORDER BY PM.PRESENTATION_COMPONENT_IDX";
45
46     
47     public void initQuery(Connection con) {
48         super.initQuery(
49             con,
50             ISPREPARED,
51             PARAMORDER,
52             PARAMTYPES,
53             SETRELEVANTS,
54             SQLSTRING );
55     }
56 }
57
58
Popular Tags