01: package com.teamkonzept.lib.db.queries;
02:
03: import java.sql.*;
04:
05: import com.teamkonzept.db.*;
06:
07: /**
08: * TKDBPropGetGroupsByName
09: * input (PROP_ID)
10: * output (PROPGROUP_ID, PROPGROUP_NAME, PROP_ID)
11: * @author
12: * @version
13: */
14: public class TKDBPropGroupGetPropsByName extends TKPrepQuery {
15:
16: /** prepared querie ?*/
17: public final static boolean ISPREPARED = true;
18:
19: public final static String[] PARAMORDER = { "PROPGROUP_NAME" };
20:
21: public final static Object[][] PARAMTYPES = { { "PROPGROUP_NAME",
22: new Integer(Types.VARCHAR) } };
23:
24: public final static boolean[] SETRELEVANTS = { true };
25:
26: /** die sql-Query */
27: public final static String SQLSTRING =
28:
29: "select a.NAME, "
30: + " a.VALUE "
31: + "from PROPERTY a, PROPERTY_GROUP_MEMBER b, PROPERTY_GROUP c "
32: + "where b.PROPERTY_ID = a.PROPERTY_ID "
33: + " and b.PROPERTY_GROUP_ID = c.PROPERTY_GROUP_ID "
34: + " and c.NAME = ? " + "order by "
35: + DBStringFactory.upper_order() + " (a.NAME)";
36:
37: public void initQuery(Connection con) {
38: super.initQuery(con, ISPREPARED, PARAMORDER, PARAMTYPES,
39: SETRELEVANTS, SQLSTRING);
40: }
41: }
|