Source Code Cross Referenced for TKDBSiteTreeRenameRecursive.java in  » Content-Management-System » webman » com » teamkonzept » webman » mainint » db » queries » duplication » oracle » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » webman » com.teamkonzept.webman.mainint.db.queries.duplication.oracle 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package com.teamkonzept.webman.mainint.db.queries.duplication.oracle;
02:
03:        import com.teamkonzept.db.*; //import com.teamkonzept.lib.*;
04:
05:        import java.io.*;
06:        import java.util.*;
07:        import java.sql.*;
08:
09:        /**
10:         * fügt an die Namen aller Knoten im Sitetree unterhalb des Knotens 
11:         * mit ID ROOT_ID
12:         * die Erweiterung NAME_EXT an, vorne wenn POS == 0, sonst hinten.
13:         * SITE_NODE_NAME und SITE_NODE_SHORTNAME werden veraendert
14:         */
15:        public class TKDBSiteTreeRenameRecursive extends TKPrepQuery {
16:
17:            public final static boolean isPrepared = true;
18:
19:            public final static String[] paramOrder = { "NAME_EXT", "POS",
20:                    "ROOT_ID" };
21:
22:            public final static Object[][] paramTypes = { { "NAME_EXT ",
23:                    new Integer(Types.VARCHAR) } };
24:
25:            public final static boolean[] setRelevants = null;
26:
27:            public final static String sqlString =
28:
29:            /* Vorne oder hinten anhŠngen einer Namenserweiterung im Site Tree bei allen Kindern eines Nodes */
30:            " DECLARE "
31:                    + " 	name_ext 	VARCHAR2(100);  "
32:                    + " 	root_id 	INTEGER; "
33:                    + " 	root_right 	INTEGER; "
34:                    + " 	root_left 	INTEGER; "
35:                    + " 	pos		INTEGER; "
36:                    + " BEGIN "
37:                    + "    name_ext	:= ?; "
38:                    + "    pos			:= ?; "
39:                    + "    root_id		:= ?; "
40:
41:                    + "    SELECT RIGHT_NR INTO  root_right   "
42:                    + "    		   FROM SITE_TREE   "
43:                    + "    		   WHERE   "
44:                    + "    		   SITE_NODE_ID = root_id;   "
45:
46:                    + "    SELECT LEFT_NR INTO root_left   "
47:                    + "    		   FROM SITE_TREE   "
48:                    + "    		   WHERE   "
49:                    + "    		   SITE_NODE_ID = root_id;    "
50:                    + "    IF (pos = 0) THEN "
51:                    + "        " /* vorne anfuegen */
52:                    + "    	UPDATE SITE_TREE   "
53:                    + "    	SET SITE_NODE_NAME = name_ext || SITE_NODE_NAME   "
54:                    + "    	WHERE LEFT_NR  > root_left  "
55:                    + "    	      AND   "
56:                    + "    	      RIGHT_NR < root_right;   "
57:
58:                    + "    	UPDATE SITE_TREE   "
59:                    + "    	SET SITE_NODE_SHORTNAME =  name_ext || SITE_NODE_SHORTNAME   "
60:                    + "    	WHERE LEFT_NR  > root_left   "
61:                    + "    	      AND   "
62:                    + "    	      RIGHT_NR < root_right;  "
63:                    + "    ELSE       "
64:                    + "          " /* hinten anfuegen */
65:                    + "    	UPDATE SITE_TREE   "
66:                    + "    	SET SITE_NODE_NAME = SITE_NODE_NAME  || name_ext   "
67:                    + "    	WHERE LEFT_NR  > root_left   "
68:                    + "    	      AND   "
69:                    + "    	      RIGHT_NR < root_right;	   "
70:
71:                    + "    	UPDATE SITE_TREE   "
72:                    + "    	set SITE_NODE_SHORTNAME =  SITE_NODE_SHORTNAME || name_ext     "
73:                    + "    	WHERE LEFT_NR  > root_left   "
74:                    + "    	      AND   "
75:                    + "    	      RIGHT_NR < root_right;  " + "    END IF; "
76:                    + " END; "
77:
78:            ;
79:
80:            public void initQuery(Connection con) {
81:                super.initQuery(con, isPrepared, paramOrder, paramTypes,
82:                        setRelevants, sqlString);
83:            }
84:        }
ww_w.__j___a__va2___s__.___c___om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.