01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/publishing/markups/db/queries/TKMarkupGetDefinitions.java,v 1.6 2001/11/06 16:18:36 markus Exp $
03: *
04: */
05: package com.teamkonzept.publishing.markups.db.queries;
06:
07: import java.sql.*;
08:
09: import com.teamkonzept.db.*;
10: import com.teamkonzept.webman.mainint.db.queries.markups.*;
11: import com.teamkonzept.webman.mainint.WebmanExceptionHandler;
12:
13: /**
14: * @author
15: * @version
16: */
17: public class TKMarkupGetDefinitions extends TKExtendedPrepQuery {
18:
19: public final static boolean ISPREPARED = true;
20: public final static String[] PARAMORDER = null;
21: public final static Object[][] PARAMTYPES = null;
22: public final static boolean[] SETRELEVANTS = { true, true };
23:
24: protected static Class[] queryClasses = {
25: SelectAllTextAttribute.class, // [0]
26: SelectAllTextAttributeSyntax.class // [1]
27: };
28:
29: public boolean execute() {
30: try {
31: init(queryClasses); // init query objects
32:
33: boolean isNotOpen = aTKDBConnection.isAutoCommit();
34: if (isNotOpen) {
35: TKDBManager.beginTransaction();
36: }
37:
38: // QUERY: SELECT * FROM TEXT_ATTRIBUTE
39: // CLASS: SelectAllTextAttribute.class
40: // [0]
41: queries[0].execute();
42: addResult(queries[0].fetchResultSet());
43:
44: // QUERY: SELECT * FROM TEXT_ATTRIBUTE_SYNTAX
45: // CLASS: SelectAllTextAttributeSyntax.class
46: // [1]
47: queries[1].execute();
48: addResult(queries[1].fetchResultSet());
49:
50: if (isNotOpen) {
51: TKDBManager.commitTransaction();
52: }
53: } catch (Throwable t) {
54: TKDBManager.safeRollbackTransaction(t);
55: }
56: return hasResults();
57: }
58:
59: public void initQuery(Connection con) {
60: super .initQuery(con, ISPREPARED, PARAMORDER, PARAMTYPES,
61: SETRELEVANTS, null);
62: }
63:
64: /* protected void initConcreteCompositeQuery()throws SQLException {
65: registerQuery( SelectAllTextAttribute.class);
66: registerQuery( SelectAllTextAttributeSyntax.class);
67: }*/
68:
69: }
|