01: package com.teamkonzept.webman.mainint.db.queries;
02:
03: import java.sql.*;
04:
05: import com.teamkonzept.db.*;
06:
07: /**
08: * TKDBPropGetGroups
09: * input (PROP_ID)
10: * output (PROPGROUP_ID, PROPGROUP_NAME, PROP_ID)
11: * @author
12: * @version
13: */
14: public class TKDBPropGetGroups extends TKPrepQuery {
15:
16: /** prepariert ? */
17: public final static boolean ISPREPARED = true;
18:
19: public final static String[] PARAMORDER = { "PROP_ID" };
20:
21: public final static Object[][] PARAMTYPES = { { "PROP_ID",
22: new Integer(Types.INTEGER) } };
23:
24: public final static boolean[] SETRELEVANTS = { true };
25:
26: /** die sql-Query */
27: public final static String SQLSTRING =
28:
29: "SELECT PG.NAME AS PROPGROUP_NAME, "
30: + " PG.PROPERTY_GROUP_ID AS PROPGROUP_ID, "
31: + DBStringFactory.nvl()
32: + "(PGM.PROPERTY_ID,-1) AS PROP_ID "
33: + "FROM PROPERTY_GROUP PG, PROPERTY_GROUP_MEMBER PGM "
34: + "WHERE "
35: + DBStringFactory.rightOuterJoin("PGM.PROPERTY_GROUP_ID",
36: "PG.PROPERTY_GROUP_ID")
37: + " AND PGM.PROPERTY_ID = ? " + "ORDER BY "
38: + DBStringFactory.upper_order() + " (PG.NAME) ";
39:
40: public void initQuery(Connection con) {
41: super.initQuery(con, ISPREPARED, PARAMORDER, PARAMTYPES,
42: SETRELEVANTS, SQLSTRING);
43: }
44: }
|