KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > db > queries > oracle > UtilityProceduresPackageDeclaration


1 package com.teamkonzept.webman.db.queries.oracle;
2
3 import com.teamkonzept.db.*;
4 //import com.teamkonzept.lib.*;
5

6 import java.io.*;
7 import java.util.*;
8 import java.sql.*;
9
10
11
12     /**
13         Oracle package declaration for utility procedures and functions, originally designed for duplication,
14         but possibly usefull elsewhere.
15         
16         @see UtilityProceduresPackageBody
17     */

18         
19 public class UtilityProceduresPackageDeclaration extends TKPrepQuery{
20
21     public final static boolean isPrepared =
22         true;
23     
24     public final static String JavaDoc[] paramOrder =
25         null;
26     
27     public final static Object JavaDoc[][] paramTypes =
28         null;
29                 
30     public final static boolean[] setRelevants =
31         null;
32         
33     public final static String JavaDoc sqlString =
34      " CREATE OR REPLACE PACKAGE utility_procedures IS "
35
36      + " " /* Function to determine in the content tree if a subnode_id is in the subtree rooted at root_id */
37      + " FUNCTION ct_subnode(root_id INTEGER, subnode_id INTEGER)RETURN INTEGER; "
38         
39      + " " /* Function to determine in the site tree if a subnode_id is in the subtree rooted at root_id */
40      + " FUNCTION st_subnode(root_id INTEGER, subnode_id INTEGER)RETURN INTEGER; "
41         
42         
43      + " " /* Function for calculating the distance between to nodes on one path in the sitetree */
44      + " FUNCTION st_calc_dist(father_id INTEGER, child_id INTEGER) RETURN INTEGER; "
45         
46      + " " /* Function to calculate new destination of a relatve reference */
47      + " FUNCTION calc_rel_ref(src_id INTEGER, dest_id INTEGER, src_id_new INTEGER, ref_type INTEGER)RETURN INTEGER; "
48
49         
50      + " " /* Procedure to "make place" by shifting all left/right nrs above dest_right (for both trees!). */
51      + " " /* The Tablename has to be passed as parameter <treetable> */
52      + " PROCEDURE make_place(dest_right INTEGER, shift INTEGER, treetable VARCHAR2); "
53         
54      + " ILLEGAL_REL_REF EXCEPTION; "
55      + " END utility_procedures; "
56
57      ;
58     
59     public void initQuery(Connection con) {
60         super.initQuery(
61             con,
62             isPrepared,
63             paramOrder,
64             paramTypes,
65             setRelevants,
66             sqlString );
67     }
68 }
69
70
Popular Tags