rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r805798 - in /websites/staging/rave/trunk: ./ content/rave/documentation/configure-database.html
Date Wed, 22 Feb 2012 15:52:58 GMT
Author: buildbot
Date: Wed Feb 22 15:52:57 2012
New Revision: 805798

Log:
Staging update by buildbot for rave

Modified:
    websites/staging/rave/trunk/   (props changed)
    websites/staging/rave/trunk/content/rave/documentation/configure-database.html

Propchange: websites/staging/rave/trunk/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb 22 15:52:57 2012
@@ -1 +1 @@
-1292340
+1292356

Modified: websites/staging/rave/trunk/content/rave/documentation/configure-database.html
==============================================================================
--- websites/staging/rave/trunk/content/rave/documentation/configure-database.html (original)
+++ websites/staging/rave/trunk/content/rave/documentation/configure-database.html Wed Feb 22 15:52:57 2012
@@ -182,6 +182,528 @@ The default portal properties can be fou
 <li>The DataSourcePopulator cannot handle a PostgreSQL database that has not yet been initialized.</li>
 <li>The syntax for setting variables in SQL queries in PostgreSQL is different from the syntax in H2 databases. Therefore the default data cannot be loaded using the initial_data.sql file.</li>
 </ul>
+<h3 id="oracle_10g">Oracle 10g</h3>
+<h4 id="jdbc_driver_2">JDBC driver</h4>
+<p>Install the <a href="http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html">Oracle JDBC driver</a> in the lib directory of your Apache Tomcat instance. This driver is not available in a public Maven repository.</p>
+<h4 id="properties_2">Properties</h4>
+<p>Rave portal:</p>
+<div class="codehilite"><pre><span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">url</span><span class="o">=</span><span class="n">jdbc:oracle:thin:</span><span class="nv">@localhost:1521:raveportal</span>
+<span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">driver</span><span class="o">=</span><span class="n">oracle</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span class="n">OracleDriver</span>
+<span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">username</span><span class="o">=</span><span class="n">rave</span>
+<span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">password</span><span class="o">=</span><span class="n">rave</span>
+
+<span class="n">portal</span><span class="o">.</span><span class="n">jpaDialect</span><span class="o">=</span><span class="n">org</span><span class="o">.</span><span class="n">springframework</span><span class="o">.</span><span class="n">orm</span><span class="o">.</span><span class="n">jpa</span><span class="o">.</span><span class="n">DefaultJpaDialect</span>
+<span class="n">portal</span><span class="o">.</span><span class="n">jpaVendorAdapter</span><span class="o">.</span><span class="n">databasePlatform</span><span class="o">=</span><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">openjpa</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span class="n">sql</span><span class="o">.</span><span class="n">OracleDictionary</span>
+<span class="n">portal</span><span class="o">.</span><span class="n">jpaVendorAdapter</span><span class="o">.</span><span class="n">database</span><span class="o">=</span><span class="n">ORACLE</span>
+</pre></div>
+
+
+<p>Rave Shindig:</p>
+<div class="codehilite"><pre><span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">url</span><span class="o">=</span><span class="n">jdbc:oracle:thin:</span><span class="nv">@localhost:1521:raveportal</span>
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">driver</span><span class="o">=</span><span class="n">oracle</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span class="n">OracleDriver</span>
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">username</span><span class="o">=</span><span class="n">rave</span>
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span class="n">password</span><span class="o">=</span><span class="n">rave</span>
+
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">jpaDialect</span><span class="o">=</span><span class="n">org</span><span class="o">.</span><span class="n">springframework</span><span class="o">.</span><span class="n">orm</span><span class="o">.</span><span class="n">jpa</span><span class="o">.</span><span class="n">DefaultJpaDialect</span>
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">jpaVendorAdapter</span><span class="o">.</span><span class="n">databasePlatform</span><span class="o">=</span><span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">openjpa</span><span class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span class="n">sql</span><span class="o">.</span><span class="n">OracleDictionary</span>
+<span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span class="o">.</span><span class="n">jpaVendorAdapter</span><span class="o">.</span><span class="n">database</span><span class="o">=</span><span class="n">ORACLE</span>
+</pre></div>
+
+
+<h4 id="initial_data">Initial data</h4>
+<p>The syntax for setting variables in SQL queries in Oracle is different from the syntax in H2 databases. Therefore the default data cannot be loaded using the initial_data.sql file.
+OpenJPA can create the schema. With help from <a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html">Oracle SQL Developer</a> the minimal set of necessary data can be inserted. The script below inserts the Apache Rave portal sequences, the page layouts and granted permissions:</p>
+<div class="codehilite"><pre><span class="n">SET</span> <span class="n">serveroutput</span> <span class="n">ON</span>
+<span class="n">SET</span> <span class="n">echo</span> <span class="n">OFF</span>
+<span class="n">DECLARE</span>
+  <span class="n">page_seq</span>               <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;page&#39;</span><span class="p">;</span>
+  <span class="n">page_layout_seq</span>        <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;page_layout&#39;</span><span class="p">;</span>
+  <span class="n">region_seq</span>             <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;region&#39;</span><span class="p">;</span>
+  <span class="n">region_widget_seq</span>      <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;region_widget&#39;</span><span class="p">;</span>
+  <span class="n">user_seq</span>               <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;person&#39;</span><span class="p">;</span>
+  <span class="n">person_association_seq</span> <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;person_association&#39;</span><span class="p">;</span>
+  <span class="n">groups_seq</span>             <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;groups&#39;</span><span class="p">;</span>
+  <span class="n">group_members_seq</span>      <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;group_members&#39;</span><span class="p">;</span>
+  <span class="n">widget_seq</span>             <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;widget&#39;</span><span class="p">;</span>
+  <span class="n">granted_authority_seq</span>  <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;granted_authority&#39;</span><span class="p">;</span>
+  <span class="n">widget_comment_seq</span>     <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;widget_comment&#39;</span><span class="p">;</span>
+  <span class="n">widget_rating_seq</span>      <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;widget_rating&#39;</span><span class="p">;</span>
+  <span class="n">portal_preference_seq</span>  <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;portal_preference&#39;</span><span class="p">;</span>
+  <span class="n">tag_seq</span>                <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;tag&#39;</span><span class="p">;</span>
+  <span class="n">widget_tag_seq</span>         <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;widget_tag&#39;</span><span class="p">;</span>
+  <span class="n">category_seq</span>           <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;category&#39;</span><span class="p">;</span>
+  <span class="n">page_type_seq</span>          <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span> <span class="p">:</span><span class="o">=</span> <span class="s">&#39;page_type&#39;</span><span class="p">;</span>
+  <span class="n">user_authority_id</span>      <span class="n">NUMBER</span><span class="p">;</span>
+  <span class="n">col_id</span>                 <span class="n">NUMBER</span><span class="p">;</span>
+<span class="k">BEGIN</span>
+  <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;RAVE Initialisation script starting&#39;</span><span class="p">);</span>
+  <span class="k">BEGIN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Dropping table RAVE_PORTAL_SEQUENCES&#39;</span><span class="p">);</span>
+    <span class="n">EXECUTE</span> <span class="n">IMMEDIATE</span> <span class="s">&#39;DROP TABLE RAVE_PORTAL_SEQUENCES&#39;</span><span class="p">;</span>
+  <span class="n">EXCEPTION</span>
+  <span class="n">WHEN</span> <span class="n">OTHERS</span> <span class="n">THEN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Error &#39;</span> <span class="o">||</span> <span class="n">SQLCODE</span> <span class="o">||</span> <span class="s">&#39; - &#39;</span> <span class="o">||</span> <span class="n">SQLERRM</span><span class="p">);</span>
+  <span class="k">END</span><span class="p">;</span>
+  <span class="k">BEGIN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Creating table RAVE_PORTAL_SEQUENCES&#39;</span><span class="p">);</span>
+    <span class="n">EXECUTE</span> <span class="n">IMMEDIATE</span> <span class="s">&#39;CREATE TABLE RAVE_PORTAL_SEQUENCES (seq_name VARCHAR(255) PRIMARY KEY NOT NULL,seq_count NUMBER(19))&#39;</span><span class="p">;</span>
+  <span class="n">EXCEPTION</span>
+  <span class="n">WHEN</span> <span class="n">OTHERS</span> <span class="n">THEN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Error&#39;</span> <span class="o">||</span> <span class="n">SQLCODE</span> <span class="o">||</span> <span class="s">&#39; - &#39;</span> <span class="o">||</span> <span class="n">SQLERRM</span><span class="p">);</span>
+  <span class="k">END</span><span class="p">;</span>
+  <span class="k">BEGIN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Inserting RAVE_PORTAL_SEQUENCES values&#39;</span><span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">page_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">page_layout_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">region_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">region_widget_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="s">&#39;region_widget_preference&#39;</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">user_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">person_association_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">groups_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">group_members_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">widget_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">widget_comment_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">widget_rating_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">granted_authority_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">portal_preference_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span> <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span><span class="n">seq_name</span><span class="p">,</span> <span class="n">seq_count</span>
+      <span class="p">)</span> <span class="n">VALUES</span>
+      <span class="p">(</span><span class="n">tag_seq</span><span class="p">,</span> <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">widget_tag_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">category_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+      <span class="p">(</span>
+        <span class="n">seq_name</span><span class="p">,</span>
+        <span class="n">seq_count</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">page_type_seq</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+  <span class="n">EXCEPTION</span>
+  <span class="n">WHEN</span> <span class="n">OTHERS</span> <span class="n">THEN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span>
+    <span class="p">(</span>
+      <span class="s">&#39;Error&#39;</span> <span class="o">||</span> <span class="n">SQLCODE</span> <span class="o">||</span> <span class="s">&#39; - &#39;</span> <span class="o">||</span> <span class="n">SQLERRM</span>
+    <span class="p">)</span>
+    <span class="p">;</span>
+  <span class="k">END</span><span class="p">;</span>
+  <span class="k">BEGIN</span>
+    <span class="sr">/* USER */</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span>
+    <span class="p">(</span>
+      <span class="s">&#39;Inserting granted_authority USER value&#39;</span>
+    <span class="p">)</span>
+    <span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">user_authority_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">granted_authority_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">granted_authority</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">authority</span><span class="p">,</span>
+        <span class="n">default_for_new_user</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">user_authority_id</span><span class="p">,</span>
+        <span class="s">&#39;ROLE_USER&#39;</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">granted_authority_seq</span><span class="p">;</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Inserting granted_authority ADMIN value&#39;</span><span class="p">);</span>
+    <span class="sr">/* ADMIN */</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">user_authority_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">granted_authority_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">granted_authority</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">authority</span><span class="p">,</span>
+        <span class="n">default_for_new_user</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">user_authority_id</span><span class="p">,</span>
+        <span class="s">&#39;ROLE_ADMIN&#39;</span><span class="p">,</span>
+        <span class="mi">0</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">granted_authority_seq</span><span class="p">;</span>
+  <span class="n">EXCEPTION</span>
+  <span class="n">WHEN</span> <span class="n">OTHERS</span> <span class="n">THEN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span> <span class="p">(</span> <span class="s">&#39;Error&#39;</span> <span class="o">||</span> <span class="n">SQLCODE</span> <span class="o">||</span> <span class="s">&#39; - &#39;</span> <span class="o">||</span> <span class="n">SQLERRM</span> <span class="p">)</span> <span class="p">;</span>
+  <span class="k">END</span><span class="p">;</span>
+  <span class="k">BEGIN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span><span class="p">(</span><span class="s">&#39;Inserting page_layout values&#39;</span><span class="p">);</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_1&#39;</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+        <span class="mi">0</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_2&#39;</span><span class="p">,</span>
+        <span class="mi">2</span><span class="p">,</span>
+        <span class="mi">1</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_2wn&#39;</span><span class="p">,</span>
+        <span class="mi">2</span><span class="p">,</span>
+        <span class="mi">2</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_3&#39;</span><span class="p">,</span>
+        <span class="mi">3</span><span class="p">,</span>
+        <span class="mi">3</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_3nwn&#39;</span><span class="p">,</span>
+        <span class="mi">3</span><span class="p">,</span>
+        <span class="mi">4</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_3_newuser&#39;</span><span class="p">,</span>
+        <span class="mi">3</span><span class="p">,</span>
+        <span class="mi">5</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_4&#39;</span><span class="p">,</span>
+        <span class="mi">4</span><span class="p">,</span>
+        <span class="mi">6</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">SELECT</span> <span class="n">seq_count</span>
+    <span class="n">INTO</span> <span class="n">col_id</span>
+    <span class="n">FROM</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+    <span class="n">INSERT</span>
+    <span class="n">INTO</span> <span class="n">page_layout</span>
+      <span class="p">(</span>
+        <span class="n">entity_id</span><span class="p">,</span>
+        <span class="n">code</span><span class="p">,</span>
+        <span class="n">number_of_regions</span><span class="p">,</span>
+        <span class="n">render_sequence</span><span class="p">,</span>
+        <span class="n">user_selectable</span>
+      <span class="p">)</span>
+      <span class="n">VALUES</span>
+      <span class="p">(</span>
+        <span class="n">col_id</span><span class="p">,</span>
+        <span class="s">&#39;columns_3nwn_1_bottom&#39;</span><span class="p">,</span>
+        <span class="mi">4</span><span class="p">,</span>
+        <span class="mi">7</span><span class="p">,</span>
+        <span class="mi">1</span>
+      <span class="p">);</span>
+    <span class="n">UPDATE</span> <span class="n">RAVE_PORTAL_SEQUENCES</span>
+    <span class="n">SET</span> <span class="n">seq_count</span>  <span class="o">=</span> <span class="p">(</span><span class="n">seq_count</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
+    <span class="n">WHERE</span> <span class="n">seq_name</span> <span class="o">=</span> <span class="n">page_layout_seq</span><span class="p">;</span>
+  <span class="n">EXCEPTION</span>
+  <span class="n">WHEN</span> <span class="n">OTHERS</span> <span class="n">THEN</span>
+    <span class="n">dbms_output</span><span class="o">.</span><span class="n">put_line</span> <span class="p">(</span> <span class="s">&#39;Error&#39;</span> <span class="o">||</span> <span class="n">SQLCODE</span> <span class="o">||</span> <span class="s">&#39; - &#39;</span> <span class="o">||</span> <span class="n">SQLERRM</span> <span class="p">)</span> <span class="p">;</span>
+  <span class="k">END</span><span class="p">;</span>
+<span class="k">END</span><span class="p">;</span>
+</pre></div>
   </div>
 
   <div id="footer">



Mime
View raw message