KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > mainint > db > queries > content > MediaDeleteUnreferenced


1 /*
2  * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/mainint/db/queries/content/MediaDeleteUnreferenced.java,v 1.1 2001/05/23 09:12:49 marwan Exp $
3  *
4  */

5 package com.teamkonzept.webman.mainint.db.queries.content;
6
7 import java.sql.*;
8
9 import com.teamkonzept.db.*;
10
11
12 public class MediaDeleteUnreferenced extends TKPrepQuery implements QueryConstants{
13
14     public final static boolean isPrepared =true;
15     
16     public final static String JavaDoc[] paramOrder = null;
17         
18     public final static Object JavaDoc[][] paramTypes = null;
19         
20     public final static boolean[] setRelevants = null;
21         
22         
23     public final static String JavaDoc sqlString =
24     
25        " DELETE FROM MEDIA ME "
26      + " WHERE NOT EXISTS "
27      + " ( "
28      + " SELECT MEDIA_ID "
29      + " FROM CONTENT_VALUE C_VAL "
30      + " WHERE C_VAL.MEDIA_ID = ME.MEDIA_ID "
31      + " ) "
32
33     
34       ;
35         
36         
37
38     public void initQuery(Connection con) {
39         super.initQuery(
40             con,
41             isPrepared,
42             paramOrder,
43             paramTypes,
44             setRelevants,
45             sqlString );
46     }
47 }
48
Popular Tags