[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/java connectivity/prj scp2/source

Damjan Jovanovic damjan at apache.org
Fri Oct 27 02:09:48 UTC 2017


 connectivity/java/dbtools/build.xml                                                                                              |  249 +++++
 connectivity/java/dbtools/makefile.mk                                                                                            |   41 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/CompHelper.java                                 |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OArrayEnumeration.java                          |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OCatalog.java                                        |    7 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumn.java                                         |   13 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumnContainer.java                                |   15 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OContainer.java                                      |   15 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/ODescriptor.java                                     |   11 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumn.java                                    |   11 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexContainer.java                                 |   15 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKey.java                                            |   13 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumnContainer.java                             |    9 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyContainer.java                                   |   13 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OTable.java                                          |    7 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/SqlTableHelper.java                                  |   13 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptor.java               |   11 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxDescriptorContainer.java            |   11 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java            |    9 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java   |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java         |    5 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ComposeRule.java                                      |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DBTypeConversion.java                                 |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DbTools.java                                          |    7 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ISQLStatementHelper.java                              |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameAccessAdapter.java                          |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ORowSetValue.java                                     |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Osl.java                                              |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/PropertyIds.java                                      |    2 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/SharedResources.java                                  |    6 
 connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/StandardSQLState.java                                 |    2 
 connectivity/java/sdbc_postgresql/build.xml                                                                                      |   11 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/DatabaseMetaDataResultSet.java                          |  481 ++++++++++
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlCatalog.java                                  |    7 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDatabaseMetadata.java                         |    4 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java                                   |    7 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTable.java                                    |   21 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTables.java                                   |   17 
 connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlViews.java                                    |   21 
 connectivity/prj/build.lst                                                                                                       |    5 
 connectivity/prj/d.lst                                                                                                           |    1 
 scp2/source/ooo/file_ooo.scp                                                                                                     |    1 
 scp2/source/ooo/module_hidden_ooo.scp                                                                                            |    1 
 44 files changed, 936 insertions(+), 146 deletions(-)

New commits:
commit 8c5eeb4f15dc565768dd08cdce98afe3d6a7fc30
Author: Damjan Jovanovic <damjan at apache.org>
Date:   Fri Oct 27 00:47:30 2017 +0000

    Split off a new dbtools.jar from the PostgreSQL driver, containing
    
    the support code that can be reused by other drivers.
    
    Also put it in an org.apache.openoffice base package.
    
    Patch by: me

diff --git a/connectivity/java/dbtools/build.xml b/connectivity/java/dbtools/build.xml
new file mode 100644
index 000000000000..a987a8dce879
--- /dev/null
+++ b/connectivity/java/dbtools/build.xml
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--***********************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ ***********************************************************-->
+
+
+<project name="dbtools" default="main" basedir=".">
+
+    <!-- ================================================================= -->
+    <!-- settings                                                          -->
+    <!-- ================================================================= -->
+
+    <!-- global properties -->
+    <property file="../../../ant.properties"/>
+    <!-- version info -->
+    <property file="../../../solenv/inc/minor.mk"/>
+
+    <!-- name of this sub target used in recursive builds -->
+    <property name="target" value="dbtools"/>
+
+    <!-- name of jar file created, without .jar extension -->
+    <property name="jarname" value="dbtools"/>
+
+    <!-- relative path to project directory -->
+    <property name="prj" value="../.."/>
+
+    <!-- build output directory -->
+    <!-- FIXME: there are also extremely rare/obsolete dbcs/bndchk/truetime/hbtoolkit cases in main/solenv/inc/settings.mk -->
+    <condition property="out" value="${prj}/${OUTPATH}.cap">
+        <isset property="${profile}"/>
+    </condition>
+    <condition property="out" value="${prj}/${OUTPATH}.pro">
+        <isset property="${PRODUCT}"/>
+    </condition>
+    <property name="out" value="${prj}/${OUTPATH}"/>
+
+    <!-- build directories -->
+    <property name="build.dir" value="${out}"/>
+    <property name="build.class" value="${build.dir}/class/${target}"/>
+    <property name="build.misc" value="${build.dir}/misc/${target}"/>
+
+    <!-- start of java source code package structure -->
+    <property name="java.dir" value="src"/>
+
+    <!-- define how to handle CLASSPATH environment -->
+    <property name="build.sysclasspath" value="ignore"/>
+
+    <!-- classpath settings for compile and javadoc tasks -->
+    <condition property="jar-class-path" value="${COMMONS_LANG_JAR}" else="commons-lang3-3.3.jar">
+        <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/>
+    </condition>
+    <condition property="commons-lang-jar" value="${COMMONS_LANG_JAR}" else="${OUTDIR}/bin/commons-lang3-3.3.jar">
+        <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/>
+    </condition>
+    <path id="classpath">
+        <pathelement location="${OUTDIR}/bin/juh.jar"/>
+        <pathelement location="${OUTDIR}/bin/jurt.jar"/>
+        <pathelement location="${OUTDIR}/bin/ridl.jar"/>
+        <pathelement location="${OUTDIR}/bin/unoil.jar"/>
+        <!-- 3rd party libs -->
+        <pathelement location="${commons-lang-jar}"/>
+    </path>
+
+    <!-- name to display in documentation -->
+    <property name="docname" value="dbtools"/>
+
+    <!-- set "modern" java compiler -->
+    <property name="build.compiler" value="modern"/>
+
+    <!-- set wether we want to compile with debug information -->
+    <property name="debug" value="on"/>
+
+    <!-- set wether we want to compile with optimisation -->
+    <property name="optimize" value="off"/>
+
+    <!-- set wether we want to compile with or without deprecation -->
+    <property name="deprecation" value="on"/>
+
+    <target name="info">
+        <echo message="--------------------"/>
+        <echo message="${target}"/>
+        <echo message="--------------------"/>
+    </target>
+
+    <!-- ================================================================= -->
+    <!-- custom targets                                                    -->
+    <!-- ================================================================= -->
+
+    <!-- the main target, called in recursive builds -->
+    <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/>
+
+    <!-- prepare output directories -->
+    <target name="prepare">
+        <mkdir dir="${build.dir}"/>
+        <mkdir dir="${build.dir}/doc/${target}"/>
+        <mkdir dir="${build.class}"/>
+        <mkdir dir="${build.misc}"/>
+    </target>
+
+
+    <target name="res" depends="prepare">
+        <copy todir="${build.class}">
+             <fileset dir="${java.dir}">
+                 <include name="**/*.properties"/>
+                 <include name="**/*.css"/>
+                 <include name="**/*.dtd"/>
+                 <include name="**/*.form"/>
+                 <include name="**/*.gif "/>
+                 <include name="**/*.htm"/>
+                 <include name="**/*.html"/>
+                 <include name="**/*.js"/>
+                 <include name="**/*.mod"/>
+                 <include name="**/*.sql"/>
+                 <include name="**/*.xml"/>
+                 <include name="**/*.xsl"/>
+                 <include name="**/*.map"/>
+
+             </fileset>
+        </copy>
+    </target>
+
+
+    <target name="compile" depends="prepare,res">
+    <javac destdir="${build.class}"
+           debug="${debug}"
+               debuglevel="lines,vars,source"
+               deprecation="${deprecation}"
+           optimize="${optimize}"
+           classpathref="classpath">
+            <src path="${java.dir}"/>
+        <include name="**/*.java"/>
+    </javac>
+    </target>
+
+    <!-- check if javadoc is up to date -->
+    <target name="javadoc_check" depends="prepare" if="build.dir">
+    <uptodate property="javadocBuild.notRequired" value="true"
+            targetfile="${build.dir}/doc/${target}/${target}_javadoc.zip">
+        <srcfiles dir="${java.dir}" includes="**/*.java"/>
+    </uptodate>
+    </target>
+
+    <!-- generate java documentation -->
+    <target name="javadoc" depends="prepare,javadoc_check,compile"
+         unless="javadocBuild.notRequired"
+         if="build.dir">
+
+        <javadoc destdir="${build.dir}/doc/${target}/javadoc"
+                 verbose="false"
+                 author="false"
+                 nodeprecated="true"
+                 nodeprecatedlist="true"
+                 use="true"
+                 Doctitle="${docname}"
+                 windowtitle="${docname}"
+                 classpathref="classpath">
+
+            <packageset dir="${java.dir}" defaultexcludes="yes">
+                <include name="com/**"/>
+                <include name="org/**"/>
+            </packageset>
+
+            <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api"
+                  packagelistLoc="${common.doc}/jdk1.4.2"/>
+            <link offline="true"
+                  href="http://java.sun.com/products/servlet/2.3/javadoc"
+                  packagelistLoc="${common.doc}/servlet2.3"/>
+            <link offline="true"
+                  href="http://logging.apache.org/log4j/docs/api"
+                  packagelistLoc="${common.doc}/log4j-1.2.8"/>
+            <link offline="true"
+                  href="http://java.sun.com/products/javabeans/glasgow/javadocs"
+                  packagelistLoc="${common.doc}/jaf-1.0.2"/>
+            <link offline="true"
+                  href="http://java.sun.com/products/javamail/javadocs"
+                  packagelistLoc="${common.doc}/javamail-1.3.1"/>
+            <link offline="true"
+                  href="http://ws.apache.org/soap/docs"
+                  packagelistLoc="${common.doc}/soap-2.3.1"/>
+
+            <bottom><i>Copyright &#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA</i></bottom>
+            <header>${docname}</header>
+
+       </javadoc>
+    </target>
+
+    <!-- zip documentation and store in build/doc/${target} -->
+    <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired">
+    <zip zipfile="${build.dir}/doc/${target}/${target}_javadoc.zip"
+      basedir="${build.dir}/doc/${target}/javadoc"
+      update="true"/>
+    </target>
+
+    <!-- clean up -->
+    <target name="clean" depends="prepare">
+        <delete dir="${build.class}" includeEmptyDirs="true"/>
+        <delete dir="${build.dir}/doc/${target}" includeEmptyDirs="true"/>
+    </target>
+
+    <!-- create jar file -->
+    <target name="jar" depends="prepare,compile" if="build.class">
+        <jar jarfile="${build.class}/${jarname}.jar"
+             basedir="${build.class}">
+            <manifest>
+                <attribute name="Class-Path" value="${jar-class-path} juh.jar jurt.jar ridl.jar unoil.jar"/>
+                <attribute name="Solar-Version" value="${RSCREVISION}"/>
+                <attribute name="RegistrationClassName" value="com.sun.star.sdbcx.comp.postgresql.PostgresqlDriver"/>
+                <attribute name="Sealed" value="true"/>
+                <attribute name="UNO-Type-Path" value=""/>
+            </manifest>
+            <include name="**/*.class"/>
+            <include name="**/*.properties"/>
+            <include name="**/*.css"/>
+            <include name="**/*.dtd"/>
+            <include name="**/*.form"/>
+            <include name="**/*.gif "/>
+            <include name="**/*.htm"/>
+            <include name="**/*.html"/>
+            <include name="**/*.js"/>
+            <include name="**/*.mod"/>
+            <include name="**/*.sql"/>
+            <include name="**/*.xml"/>
+            <include name="**/*.xsl"/>
+            <include name="**/*.map"/>
+        </jar>
+    </target>
+
+    <target name="test" depends="prepare">
+    </target>
+
+</project>
+
diff --git a/connectivity/java/dbtools/makefile.mk b/connectivity/java/dbtools/makefile.mk
new file mode 100644
index 000000000000..47a37b3033b7
--- /dev/null
+++ b/connectivity/java/dbtools/makefile.mk
@@ -0,0 +1,41 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+PRJ=..$/..
+PRJNAME=connectivity
+TARGET=dbtools
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : ant.mk
+
+.IF defined(debug) || defined(DEBUG)
+ANTDEBUG=true
+.ELSE
+ANTDEBUG=off
+.ENDIF
+
+ANT_FLAGS+=-Dantdebug=$(ANTDEBUG)
+
+ALLTAR: ANTBUILD
+
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/CompHelper.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/CompHelper.java
similarity index 98%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/CompHelper.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/CompHelper.java
index 27ac3439e2ba..6bf228dc5941 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/CompHelper.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/CompHelper.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.comphelper;
+package org.apache.openoffice.comp.sdbc.dbtools.comphelper;
 
 import com.sun.star.beans.Property;
 import com.sun.star.beans.PropertyAttribute;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OArrayEnumeration.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OArrayEnumeration.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OArrayEnumeration.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OArrayEnumeration.java
index aa24b3154bee..194ab393574b 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OArrayEnumeration.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OArrayEnumeration.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.comphelper;
+package org.apache.openoffice.comp.sdbc.dbtools.comphelper;
 
 import com.sun.star.container.NoSuchElementException;
 import com.sun.star.container.XEnumeration;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OEnumerationByIndex.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OEnumerationByIndex.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OEnumerationByIndex.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OEnumerationByIndex.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OEnumerationByName.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OEnumerationByName.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OEnumerationByName.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OEnumerationByName.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OfficeResourceBundle.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OfficeResourceBundle.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/OfficeResourceBundle.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/OfficeResourceBundle.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/PropertySet.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/PropertySet.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/PropertySet.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/PropertySet.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/PropertySetAdapter.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/PropertySetAdapter.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/comphelper/PropertySetAdapter.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/comphelper/PropertySetAdapter.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OCatalog.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OCatalog.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OCatalog.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OCatalog.java
index e91cac8f2772..844789e6b6d5 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OCatalog.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OCatalog.java
@@ -19,7 +19,10 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
+
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
 
 import com.sun.star.container.XNameAccess;
 import com.sun.star.lang.XServiceInfo;
@@ -31,8 +34,6 @@ import com.sun.star.sdbcx.XGroupsSupplier;
 import com.sun.star.sdbcx.XTablesSupplier;
 import com.sun.star.sdbcx.XUsersSupplier;
 import com.sun.star.sdbcx.XViewsSupplier;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
 
 /** Base expects the containers returned by X(Tables/Views/Groups/Users)Supplier
  * to be the same throughout the lifetime of the catalog!!
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumn.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumn.java
index 4149c1b2c55e..3fd9119a2551 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumn.java
@@ -19,7 +19,13 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertySetter;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxColumnDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.beans.PropertyAttribute;
 import com.sun.star.beans.XPropertySet;
@@ -27,11 +33,6 @@ import com.sun.star.container.XNamed;
 import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbc.ColumnValue;
 import com.sun.star.sdbcx.XDataDescriptorFactory;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxColumnDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class OColumn extends ODescriptor implements XNamed, XDataDescriptorFactory, XServiceInfo {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumnContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumnContainer.java
similarity index 93%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumnContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumnContainer.java
index 1f66c6517222..4186798a9fdf 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumnContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OColumnContainer.java
@@ -19,13 +19,20 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.SqlTableHelper.ColumnDescription;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxColumnDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.Osl;
+
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
 import com.sun.star.container.XNameAccess;
@@ -34,12 +41,6 @@ import com.sun.star.sdbc.DataType;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbc.XDatabaseMetaData;
 import com.sun.star.sdbc.XStatement;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.SqlTableHelper.ColumnDescription;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxColumnDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.Osl;
 import com.sun.star.uno.UnoRuntime;
 
 public class OColumnContainer extends OContainer {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OContainer.java
similarity index 97%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OContainer.java
index 27df7ab69915..11eb47f856d3 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OContainer.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.ArrayList;
 import java.util.Comparator;
@@ -27,6 +27,13 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.TreeMap;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.OEnumerationByIndex;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+import org.apache.openoffice.comp.sdbc.dbtools.util.Resources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.SharedResources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ContainerEvent;
@@ -50,12 +57,6 @@ import com.sun.star.sdbc.XColumnLocate;
 import com.sun.star.sdbcx.XAppend;
 import com.sun.star.sdbcx.XDataDescriptorFactory;
 import com.sun.star.sdbcx.XDrop;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.OEnumerationByIndex;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
-import com.sun.star.sdbcx.comp.postgresql.util.Resources;
-import com.sun.star.sdbcx.comp.postgresql.util.SharedResources;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.Type;
 import com.sun.star.util.XRefreshListener;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/ODescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/ODescriptor.java
similarity index 85%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/ODescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/ODescriptor.java
index d7e1b97cc805..a878fbbe1d90 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/ODescriptor.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/ODescriptor.java
@@ -19,13 +19,14 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySet;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertySetter;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.beans.PropertyAttribute;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySet;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class ODescriptor extends PropertySet {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndex.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndex.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumn.java
similarity index 89%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumn.java
index 8050a3d76499..c418f3b2a47f 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumn.java
@@ -19,15 +19,16 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxIndexColumnDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.beans.PropertyAttribute;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.lang.XServiceInfo;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxIndexColumnDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class OIndexColumn extends OColumn implements XServiceInfo {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumnContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumnContainer.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumnContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexColumnContainer.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexContainer.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexContainer.java
index 249a543a810e..ba566798b06d 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OIndexContainer.java
@@ -19,11 +19,18 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxIndexDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
@@ -39,12 +46,6 @@ import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
 import com.sun.star.sdbc.XStatement;
 import com.sun.star.sdbcx.XColumnsSupplier;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxIndexDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKey.java
similarity index 92%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKey.java
index cab0cd14c3b2..3141567fff9b 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKey.java
@@ -19,10 +19,16 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxKeyDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+
 import com.sun.star.beans.PropertyAttribute;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
@@ -31,11 +37,6 @@ import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import com.sun.star.sdbcx.XDataDescriptorFactory;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxKeyDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class OKey extends ODescriptor
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumn.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumn.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumnContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumnContainer.java
similarity index 94%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumnContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumnContainer.java
index ef278cdfa3e5..d7aec9fcd87f 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumnContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyColumnContainer.java
@@ -19,10 +19,14 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxKeyColumnDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
@@ -31,9 +35,6 @@ import com.sun.star.lang.WrappedTargetException;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxKeyColumnDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyContainer.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyContainer.java
index c220ed7f6413..49bd17fd8379 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OKeyContainer.java
@@ -19,12 +19,18 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Map;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxKeyDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+
 import com.sun.star.beans.PropertyVetoException;
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
@@ -42,11 +48,6 @@ import com.sun.star.sdbc.XRow;
 import com.sun.star.sdbc.XStatement;
 import com.sun.star.sdbcx.KeyType;
 import com.sun.star.sdbcx.XColumnsSupplier;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxKeyDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OTable.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OTable.java
index 82caf1dbcd9c..b548ea26e712 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OTable.java
@@ -19,7 +19,10 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.beans.PropertyAttribute;
 import com.sun.star.container.XIndexAccess;
@@ -33,8 +36,6 @@ import com.sun.star.sdbcx.XDataDescriptorFactory;
 import com.sun.star.sdbcx.XIndexesSupplier;
 import com.sun.star.sdbcx.XKeysSupplier;
 import com.sun.star.sdbcx.XRename;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public abstract class OTable extends ODescriptor
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OView.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OView.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OView.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/OView.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/SqlTableHelper.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/SqlTableHelper.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/SqlTableHelper.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/SqlTableHelper.java
index e7da37bf40c0..aae712217a4e 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/SqlTableHelper.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/SqlTableHelper.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -28,17 +28,18 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.Osl;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.container.ElementExistException;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbc.XDatabaseMetaData;
 import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
 import com.sun.star.sdbcx.KeyType;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.Osl;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.Any;
 import com.sun.star.uno.UnoRuntime;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptor.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptor.java
index 3b540041652e..f0bb229a4cc9 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptor.java
@@ -19,13 +19,14 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertySetter;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.ODescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.lang.XServiceInfo;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.ODescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class SdbcxColumnDescriptor extends ODescriptor implements XServiceInfo {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptorContainer.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxColumnDescriptorContainer.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxDescriptorContainer.java
similarity index 85%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxDescriptorContainer.java
index 03d8f487ca7c..a6761c8404cb 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxDescriptorContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxDescriptorContainer.java
@@ -19,14 +19,15 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
+
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.util.Resources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.SharedResources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
 
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OContainer;
-import com.sun.star.sdbcx.comp.postgresql.util.Resources;
-import com.sun.star.sdbcx.comp.postgresql.util.SharedResources;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 
 public abstract class SdbcxDescriptorContainer extends OContainer {
     public SdbcxDescriptorContainer(Object lock, boolean isCaseSensitive) {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java
index 0aa7012f168e..7607e82b82bf 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexColumnDescriptorContainer.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
 
 import com.sun.star.beans.XPropertySet;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexDescriptor.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexDescriptor.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexDescriptorContainer.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxIndexDescriptorContainer.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
similarity index 88%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
index db8ce4ce507a..8d24245bccf3 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
@@ -19,12 +19,13 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
+
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertyGetter;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.PropertySetAdapter.PropertySetter;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
 
 import com.sun.star.lang.XServiceInfo;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
 public class SdbcxKeyColumnDescriptor extends SdbcxColumnDescriptor implements XServiceInfo {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java
index 229846589e94..7371fdb613eb 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyColumnDescriptorContainer.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
 
 import com.sun.star.beans.XPropertySet;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptor.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptor.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java
similarity index 92%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java
index f6c4689f928b..4b862d2ede02 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxKeyDescriptorContainer.java
@@ -19,11 +19,12 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
+package org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors;
+
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
 
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
 
 public class SdbcxKeyDescriptorContainer extends SdbcxDescriptorContainer {
     public SdbcxKeyDescriptorContainer(Object lock, boolean isCaseSensitive) {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxTableDescriptor.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxTableDescriptor.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxViewDescriptor.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxViewDescriptor.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxViewDescriptor.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/sdbcx/descriptors/SdbcxViewDescriptor.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ComposeRule.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ComposeRule.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ComposeRule.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ComposeRule.java
index 5fee9f038e52..ba25c7f75847 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ComposeRule.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ComposeRule.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 public enum ComposeRule {
     InTableDefinitions,
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DBTypeConversion.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DBTypeConversion.java
similarity index 99%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DBTypeConversion.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DBTypeConversion.java
index bcb5185b169c..d3200b5ae486 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DBTypeConversion.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DBTypeConversion.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import java.math.BigInteger;
 import java.util.StringTokenizer;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DatabaseMetaDataResultSet.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DatabaseMetaDataResultSet.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DatabaseMetaDataResultSet.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DatabaseMetaDataResultSet.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DbTools.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DbTools.java
similarity index 99%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DbTools.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DbTools.java
index f4ebf8a7d74f..a64ff5f890a4 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/DbTools.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/DbTools.java
@@ -19,11 +19,14 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OColumnContainer.ExtraColumnInfo;
+
 import com.sun.star.beans.PropertyValue;
 import com.sun.star.beans.PropertyVetoException;
 import com.sun.star.beans.UnknownPropertyException;
@@ -53,8 +56,6 @@ import com.sun.star.sdbcx.KeyType;
 import com.sun.star.sdbcx.XAppend;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import com.sun.star.sdbcx.XKeysSupplier;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OColumnContainer.ExtraColumnInfo;
 import com.sun.star.uno.Any;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ISQLStatementHelper.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ISQLStatementHelper.java
similarity index 95%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ISQLStatementHelper.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ISQLStatementHelper.java
index 691a4c13b57b..757888f094dd 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ISQLStatementHelper.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ISQLStatementHelper.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import com.sun.star.beans.XPropertySet;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/MapToXNameAccessAdapter.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameAccessAdapter.java
similarity index 98%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/MapToXNameAccessAdapter.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameAccessAdapter.java
index 991679ba53c5..b3b5f6da8817 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/MapToXNameAccessAdapter.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameAccessAdapter.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import java.util.Map;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/MapToXNameContainerAdapter.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameContainerAdapter.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/MapToXNameContainerAdapter.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/MapToXNameContainerAdapter.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ORowSetValue.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ORowSetValue.java
similarity index 99%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ORowSetValue.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ORowSetValue.java
index f1c5489b9c8c..b4402bdc5e6c 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/ORowSetValue.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/ORowSetValue.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/Osl.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Osl.java
similarity index 96%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/Osl.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Osl.java
index 8ace907d77e0..06f78791a73e 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/Osl.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Osl.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 public class Osl {
     public static void ensure(boolean condition, String message) {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/PropertyIds.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/PropertyIds.java
similarity index 98%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/PropertyIds.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/PropertyIds.java
index 0a096e36c6a6..af232ee34397 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/PropertyIds.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/PropertyIds.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 public enum PropertyIds {
     QUERYTIMEOUT(1, "QueryTimeOut"),
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/Resources.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Resources.java
similarity index 100%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/Resources.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/Resources.java
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/SharedResources.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/SharedResources.java
similarity index 97%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/SharedResources.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/SharedResources.java
index 9f70be72bfc0..f4eb4cb5eb4b 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/SharedResources.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/SharedResources.java
@@ -19,16 +19,16 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 import java.util.List;
 
 import org.apache.commons.lang3.mutable.MutableObject;
 import org.apache.commons.lang3.tuple.Pair;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.OfficeResourceBundle;
 
 import com.sun.star.lang.NullPointerException;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.OfficeResourceBundle;
 import com.sun.star.uno.XComponentContext;
 
 /**
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/StandardSQLState.java b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/StandardSQLState.java
similarity index 97%
rename from connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/StandardSQLState.java
rename to connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/StandardSQLState.java
index 3d6990f4ad6a..45e6ef063f5b 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/util/StandardSQLState.java
+++ b/connectivity/java/dbtools/src/org/apache/openoffice/comp/sdbc/dbtools/util/StandardSQLState.java
@@ -19,7 +19,7 @@
  *
  *************************************************************/
 
-package com.sun.star.sdbcx.comp.postgresql.util;
+package org.apache.openoffice.comp.sdbc.dbtools.util;
 
 public enum StandardSQLState {
     SQL_WRONG_PARAMETER_NUMBER("07001"),
diff --git a/connectivity/java/sdbc_postgresql/build.xml b/connectivity/java/sdbc_postgresql/build.xml
index 42f8b5d33970..8cea2987883d 100644
--- a/connectivity/java/sdbc_postgresql/build.xml
+++ b/connectivity/java/sdbc_postgresql/build.xml
@@ -63,19 +63,12 @@
     <property name="build.sysclasspath" value="ignore"/>
 
     <!-- classpath settings for compile and javadoc tasks -->
-    <condition property="jar-class-path" value="${COMMONS_LANG_JAR}" else="commons-lang3-3.3.jar">
-        <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/>
-    </condition>
-    <condition property="commons-lang-jar" value="${COMMONS_LANG_JAR}" else="${OUTDIR}/bin/commons-lang3-3.3.jar">
-        <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/>
-    </condition>
     <path id="classpath">
         <pathelement location="${OUTDIR}/bin/juh.jar"/>
         <pathelement location="${OUTDIR}/bin/jurt.jar"/>
         <pathelement location="${OUTDIR}/bin/ridl.jar"/>
         <pathelement location="${OUTDIR}/bin/unoil.jar"/>
-        <!-- 3rd party libs -->
-        <pathelement location="${commons-lang-jar}"/>
+        <pathelement location="${out}/class/dbtools/dbtools.jar"/>
     </path>
 
     <!-- name to display in documentation -->
@@ -219,7 +212,7 @@
         <jar jarfile="${build.class}/${jarname}.jar"
              basedir="${build.class}">
             <manifest>
-                <attribute name="Class-Path" value="${jar-class-path} juh.jar jurt.jar ridl.jar unoil.jar"/>
+                <attribute name="Class-Path" value="${jar-class-path} juh.jar jurt.jar ridl.jar unoil.jar dbtools.jar"/>
                 <attribute name="Solar-Version" value="${RSCREVISION}"/>
                 <attribute name="RegistrationClassName" value="com.sun.star.sdbcx.comp.postgresql.PostgresqlDriver"/>
                 <attribute name="Sealed" value="true"/>
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/DatabaseMetaDataResultSet.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/DatabaseMetaDataResultSet.java
new file mode 100644
index 000000000000..5f4f50bd1d5c
--- /dev/null
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/DatabaseMetaDataResultSet.java
@@ -0,0 +1,481 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+package com.sun.star.sdbcx.comp.postgresql;
+
+import java.util.ArrayList;
+
+import org.apache.openoffice.comp.sdbc.dbtools.util.ORowSetValue;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
+import com.sun.star.beans.PropertyVetoException;
+import com.sun.star.beans.UnknownPropertyException;
+import com.sun.star.beans.XPropertyChangeListener;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertySetInfo;
+import com.sun.star.beans.XVetoableChangeListener;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.io.XInputStream;
+import com.sun.star.lang.IllegalArgumentException;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lib.uno.helper.ComponentBase;
+import com.sun.star.sdbc.SQLException;
+import com.sun.star.sdbc.XArray;
+import com.sun.star.sdbc.XBlob;
+import com.sun.star.sdbc.XClob;
+import com.sun.star.sdbc.XCloseable;
+import com.sun.star.sdbc.XColumnLocate;
+import com.sun.star.sdbc.XRef;
+import com.sun.star.sdbc.XResultSet;
+import com.sun.star.sdbc.XResultSetMetaData;
+import com.sun.star.sdbc.XResultSetMetaDataSupplier;
+import com.sun.star.sdbc.XRow;
+import com.sun.star.sdbcx.CompareBookmark;
+import com.sun.star.sdbcx.XColumnsSupplier;
+import com.sun.star.sdbcx.XRowLocate;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.Date;
+import com.sun.star.util.DateTime;
+import com.sun.star.util.Time;
+
+public class DatabaseMetaDataResultSet extends ComponentBase
+        implements XResultSet, XCloseable, XColumnsSupplier, XRowLocate, XPropertySet, XColumnLocate, XRow, XResultSetMetaDataSupplier {
+
+    private XCloseable implCloseable;
+    private XResultSetMetaDataSupplier implResultSetMetaDataSupplier;
+    private XColumnLocate implColumnLocate;
+    private XPropertySet implPropertySet;
+    private XColumnsSupplier implColumnSupplier;
+    private ArrayList<ORowSetValue[]> rows;
+    /// 0-based:
+    private int currentRow = -1;
+    /// 1-based:
+    private int currentColumn;
+
+    public DatabaseMetaDataResultSet(XResultSet impl, ArrayList<ORowSetValue[]> rows) {
+        implCloseable = UnoRuntime.queryInterface(XCloseable.class, impl);
+        implPropertySet = UnoRuntime.queryInterface(XPropertySet.class, impl);
+        implColumnSupplier = UnoRuntime.queryInterface(XColumnsSupplier.class, impl);
+        implColumnLocate = UnoRuntime.queryInterface(XColumnLocate.class, impl);
+        implResultSetMetaDataSupplier = UnoRuntime.queryInterface(XResultSetMetaDataSupplier.class, impl);
+        this.rows = rows;
+    }
+
+    // XComponent:
+    @Override
+    protected void postDisposing() {
+        try {
+            implCloseable.close();
+        } catch (SQLException sqlException) {
+        }
+    }
+
+    // XCloseable:
+
+    public void close() throws SQLException {
+        dispose();
+    }
+
+    // XResultSet:
+
+    private ORowSetValue getField(int columnIndex) throws SQLException {
+        if (isBeforeFirst() || isAfterLast()) {
+            throw new SQLException("Row out of range");
+        }
+        ORowSetValue[] fields = rows.get(currentRow);
+        if (columnIndex < 1 || fields.length < columnIndex) {
+            throw new SQLException("Column out of range");
+        }
+        currentColumn = columnIndex;
+        return fields[columnIndex - 1];
+    }
+
+    public synchronized boolean absolute(int position) throws SQLException {
+        checkDisposed();
+        if (position >= 0) {
+            currentRow = position;
+        } else {
+            currentRow = rows.size() + position;
+        }
+        if (currentRow <= -1) {
+            currentRow = -1;
+            return false;
+        }
+        if (currentRow >= rows.size()) {
+            currentRow = rows.size();
+            return false;
+        }
+        return true;
+    }
+
+    public synchronized void afterLast() throws SQLException {
+        checkDisposed();
+        currentRow = rows.size();
+    }
+
+    public synchronized void beforeFirst() throws SQLException {
+        checkDisposed();
+        currentRow = -1;
+    }
+
+    public synchronized boolean first() throws SQLException {
+        checkDisposed();
+        currentRow = 0;
+        return true;
+    }
+
+    public synchronized int getRow() throws SQLException {
+        checkDisposed();
+        return currentRow + 1;
+    }
+
+    public synchronized Object getStatement() throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized boolean isAfterLast() throws SQLException {
+        checkDisposed();
+        return currentRow == rows.size();
+    }
+
+    public synchronized boolean isBeforeFirst() throws SQLException {
+        checkDisposed();
+        return currentRow == -1;
+    }
+
+    public synchronized boolean isFirst() throws SQLException {
+        checkDisposed();
+        return currentRow == 0;
+    }
+
+    public synchronized boolean isLast() throws SQLException {
+        checkDisposed();
+        return currentRow == (rows.size() - 1);
+    }
+
+    public synchronized boolean last() throws SQLException {
+        checkDisposed();
+        currentRow = rows.size() - 1;
+        return true;
+    }
+
+    public synchronized boolean next() throws SQLException {
+        checkDisposed();
+        if (currentRow < rows.size()) {
+            ++currentRow;
+        }
+        return currentRow < rows.size();
+    }
+
+    public synchronized boolean previous() throws SQLException {
+        checkDisposed();
+        if (currentRow > -1) {
+            --currentRow;
+        }
+        return currentRow > -1;
+    }
+
+    public synchronized void refreshRow() throws SQLException {
+        checkDisposed();
+    }
+
+    public synchronized boolean relative(int offset) throws SQLException {
+        checkDisposed();
+        currentRow += offset;
+        if (currentRow <= -1) {
+            currentRow = -1;
+            return false;
+        }
+        if (currentRow >= rows.size()) {
+            currentRow = rows.size();
+            return false;
+        }
+        return true;
+    }
+
+    public synchronized boolean rowDeleted() throws SQLException {
+        checkDisposed();
+        return false;
+    }
+
+    public synchronized boolean rowInserted() throws SQLException {
+        checkDisposed();
+        return false;
+    }
+
+    public synchronized boolean rowUpdated() throws SQLException {
+        checkDisposed();
+        return false;
+    }
+
+    // XResultSetMetaDataSupplier:
+
+    public synchronized XResultSetMetaData getMetaData() throws SQLException {
+        checkDisposed();
+        return new PostgresqlResultSetMetaData(implResultSetMetaDataSupplier.getMetaData());
+    }
+
+    // XRow:
+
+    public synchronized XArray getArray(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized XInputStream getBinaryStream(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized XBlob getBlob(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized boolean getBoolean(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getBoolean();
+    }
+
+    public synchronized byte getByte(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getInt8();
+    }
+
+    public synchronized byte[] getBytes(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getSequence();
+    }
+
+    public synchronized XInputStream getCharacterStream(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized XClob getClob(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized Date getDate(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getDate();
+    }
+
+    public synchronized double getDouble(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getDouble();
+    }
+
+    public synchronized float getFloat(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getFloat();
+    }
+
+    public synchronized int getInt(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getInt32();
+    }
+
+    public synchronized long getLong(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getLong();
+    }
+
+    public synchronized Object getObject(int columnIndex, XNameAccess arg1) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.makeAny();
+    }
+
+    public synchronized XRef getRef(int columnIndex) throws SQLException {
+        checkDisposed();
+        return null;
+    }
+
+    public synchronized short getShort(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getInt16();
+    }
+
+    public synchronized String getString(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getString();
+    }
+
+    public synchronized Time getTime(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getTime();
+    }
+
+    public synchronized DateTime getTimestamp(int columnIndex) throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(columnIndex);
+        return field.getDateTime();
+    }
+
+    public synchronized boolean wasNull() throws SQLException {
+        checkDisposed();
+        ORowSetValue field = getField(currentColumn);
+        return field.isNull();
+    }
+
+    // XColumnLocate:
+
+    public synchronized int findColumn(String arg0) throws SQLException {
+        checkDisposed();
+        return implColumnLocate.findColumn(arg0);
+    }
+
+    // XPropertySet:
+
+    public synchronized void addPropertyChangeListener(String arg0, XPropertyChangeListener arg1) throws UnknownPropertyException, WrappedTargetException {
+        checkDisposed();
+        implPropertySet.addPropertyChangeListener(arg0, arg1);
+    }
+
+    public synchronized void addVetoableChangeListener(String arg0, XVetoableChangeListener arg1) throws UnknownPropertyException, WrappedTargetException {
+        checkDisposed();
+        implPropertySet.addVetoableChangeListener(arg0, arg1);
+    }
+
+    public synchronized XPropertySetInfo getPropertySetInfo() {
+        checkDisposed();
+        return implPropertySet.getPropertySetInfo();
+    }
+
+    public synchronized Object getPropertyValue(String arg0) throws UnknownPropertyException, WrappedTargetException {
+        checkDisposed();
+        return implPropertySet.getPropertyValue(arg0);
+    }
+
+    public synchronized void removePropertyChangeListener(String arg0, XPropertyChangeListener arg1) throws UnknownPropertyException, WrappedTargetException {
+        checkDisposed();
+        implPropertySet.removePropertyChangeListener(arg0, arg1);
+    }
+
+    public synchronized void removeVetoableChangeListener(String arg0, XVetoableChangeListener arg1) throws UnknownPropertyException, WrappedTargetException {
+        checkDisposed();
+        implPropertySet.removeVetoableChangeListener(arg0, arg1);
+    }
+
+    public synchronized void setPropertyValue(String arg0, Object arg1)
+            throws UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException {
+        checkDisposed();
+        implPropertySet.setPropertyValue(arg0, arg1);
+    }
+
+    // XRowLocate:
+
+    public synchronized int compareBookmarks(Object arg0, Object arg1) throws SQLException {
+        checkDisposed();
+
+        int bookmark1, bookmark2;
+        try {
+            bookmark1 = AnyConverter.toInt(arg0);
+            bookmark2 = AnyConverter.toInt(arg1);
+        } catch (IllegalArgumentException illegalArgumentException) {
+            return CompareBookmark.NOT_COMPARABLE;
+        }
+
+        if (bookmark1 < bookmark2) {
+            return CompareBookmark.LESS;
+        } else if (bookmark1 > bookmark2) {
+            return CompareBookmark.GREATER;
+        } else {
+            return CompareBookmark.EQUAL;
+        }
+    }
+
+    public synchronized Object getBookmark() throws SQLException {
+        checkDisposed();
+        return currentRow;
+    }
+
+    public synchronized boolean hasOrderedBookmarks() throws SQLException {
+        checkDisposed();
+        return true;
+    }
+
+    public synchronized int hashBookmark(Object arg0) throws SQLException {
+        checkDisposed();
+        int bookmark;
+        try {
+            bookmark = AnyConverter.toInt(arg0);
+        } catch (IllegalArgumentException illegalArgumentException) {
+            throw new SQLException("Bad bookmark", this, StandardSQLState.SQL_INVALID_BOOKMARK_VALUE.text(), 0, null);
+        }
+        return bookmark;
+    }
+
+    public synchronized boolean moveRelativeToBookmark(Object arg0, int arg1) throws SQLException {
+        checkDisposed();
+        int bookmark;
+        boolean moved = false;
+        try {
+            bookmark = AnyConverter.toInt(arg0);
+            moved = absolute(bookmark);
+            if (moved) {
+                moved = relative(arg1);
+            }
+        } catch (IllegalArgumentException illegalArgumentException) {
+        }
+        if (!moved) {
+            afterLast();
+        }
+        return moved;
+    }
+
+    public synchronized boolean moveToBookmark(Object arg0) throws SQLException {
+        checkDisposed();
+        int bookmark;
+        boolean moved = false;
+        try {
+            bookmark = AnyConverter.toInt(arg0);
+            moved = absolute(bookmark);
+        } catch (IllegalArgumentException illegalArgumentException) {
+        }
+        if (!moved) {
+            afterLast();
+        }
+        return moved;
+    }
+
+    // XColumnSupplier:
+
+    public synchronized XNameAccess getColumns() {
+        checkDisposed();
+        return implColumnSupplier.getColumns();
+    }
+}
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlCatalog.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlCatalog.java
index f67d95606a8c..44c83eeb638e 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlCatalog.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlCatalog.java
@@ -24,13 +24,14 @@ package com.sun.star.sdbcx.comp.postgresql;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OCatalog;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OContainer;
+
 import com.sun.star.container.ElementExistException;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OCatalog;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OContainer;
 import com.sun.star.uno.Any;
 import com.sun.star.uno.UnoRuntime;
 
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDatabaseMetadata.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDatabaseMetadata.java
index 3e0b24064362..4ba954021b2a 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDatabaseMetadata.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDatabaseMetadata.java
@@ -23,6 +23,8 @@ package com.sun.star.sdbcx.comp.postgresql;
 
 import java.util.ArrayList;
 
+import org.apache.openoffice.comp.sdbc.dbtools.util.ORowSetValue;
+
 import com.sun.star.lib.uno.helper.WeakBase;
 import com.sun.star.sdbc.DataType;
 import com.sun.star.sdbc.SQLException;
@@ -30,8 +32,6 @@ import com.sun.star.sdbc.XConnection;
 import com.sun.star.sdbc.XDatabaseMetaData;
 import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
-import com.sun.star.sdbcx.comp.postgresql.util.DatabaseMetaDataResultSet;
-import com.sun.star.sdbcx.comp.postgresql.util.ORowSetValue;
 import com.sun.star.uno.UnoRuntime;
 
 public class PostgresqlDatabaseMetadata extends WeakBase implements XDatabaseMetaData {
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
index 59ad50e033b4..fad41cdbb551 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
@@ -23,6 +23,10 @@ package com.sun.star.sdbcx.comp.postgresql;
 
 import java.util.ArrayList;
 
+import org.apache.openoffice.comp.sdbc.dbtools.util.Resources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.SharedResources;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.PropertyValue;
 import com.sun.star.lang.XServiceInfo;
 import com.sun.star.lang.XSingleComponentFactory;
@@ -35,9 +39,6 @@ import com.sun.star.sdbc.XDriver;
 import com.sun.star.sdbc.XDriverManager;
 import com.sun.star.sdbcx.XDataDefinitionSupplier;
 import com.sun.star.sdbcx.XTablesSupplier;
-import com.sun.star.sdbcx.comp.postgresql.util.Resources;
-import com.sun.star.sdbcx.comp.postgresql.util.SharedResources;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.Exception;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XComponentContext;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTable.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTable.java
index c82f0600e19b..b3c6b2e5f14d 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTable.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTable.java
@@ -24,22 +24,23 @@ package com.sun.star.sdbcx.comp.postgresql;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OColumnContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OIndexContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OKey;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OKeyContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OTable;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.SqlTableHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.SqlTableHelper.ColumnDescription;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxTableDescriptor;
+
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
 import com.sun.star.container.NoSuchElementException;
 import com.sun.star.lang.IndexOutOfBoundsException;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbc.XConnection;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OColumnContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OIndexContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OKey;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OKeyContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OTable;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.SqlTableHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.SqlTableHelper.ColumnDescription;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxTableDescriptor;
 
 public class PostgresqlTable extends OTable {
     public PostgresqlTable(XConnection connection, OContainer tables, String name,
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTables.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTables.java
index f2cc5c88fd8f..bd0b61476262 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTables.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlTables.java
@@ -23,6 +23,15 @@ package com.sun.star.sdbcx.comp.postgresql;
 
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxTableDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools.NameComponents;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
@@ -35,14 +44,6 @@ import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
 import com.sun.star.sdbc.XStatement;
 import com.sun.star.sdbcx.XDrop;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxTableDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools.NameComponents;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.Any;
 import com.sun.star.uno.AnyConverter;
 import com.sun.star.uno.UnoRuntime;
diff --git a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlViews.java b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlViews.java
index 767536e89cec..b820bb35b55d 100644
--- a/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlViews.java
+++ b/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlViews.java
@@ -22,6 +22,17 @@ package com.sun.star.sdbcx.comp.postgresql;
 
 import java.util.List;
 
+import org.apache.openoffice.comp.sdbc.dbtools.comphelper.CompHelper;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OContainer;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.OView;
+import org.apache.openoffice.comp.sdbc.dbtools.sdbcx.descriptors.SdbcxViewDescriptor;
+import org.apache.openoffice.comp.sdbc.dbtools.util.ComposeRule;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools;
+import org.apache.openoffice.comp.sdbc.dbtools.util.DbTools.NameComponents;
+import org.apache.openoffice.comp.sdbc.dbtools.util.Osl;
+import org.apache.openoffice.comp.sdbc.dbtools.util.PropertyIds;
+import org.apache.openoffice.comp.sdbc.dbtools.util.StandardSQLState;
+
 import com.sun.star.beans.UnknownPropertyException;
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
@@ -34,16 +45,6 @@ import com.sun.star.sdbc.XResultSet;
 import com.sun.star.sdbc.XRow;
 import com.sun.star.sdbc.XStatement;
 import com.sun.star.sdbcx.CheckOption;
-import com.sun.star.sdbcx.comp.postgresql.comphelper.CompHelper;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OContainer;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.OView;
-import com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors.SdbcxViewDescriptor;
-import com.sun.star.sdbcx.comp.postgresql.util.ComposeRule;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools;
-import com.sun.star.sdbcx.comp.postgresql.util.DbTools.NameComponents;
-import com.sun.star.sdbcx.comp.postgresql.util.Osl;
-import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
-import com.sun.star.sdbcx.comp.postgresql.util.StandardSQLState;
 import com.sun.star.uno.UnoRuntime;
 
 public class PostgresqlViews extends OContainer {
diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst
index 6727f518577f..19c532f0a995 100644
--- a/connectivity/prj/build.lst
+++ b/connectivity/prj/build.lst
@@ -1,8 +1,9 @@
 cn  connectivity    :    shell  L10N:l10n comphelper SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg LIBXSLT:libxslt APACHE_COMMONS:apache-commons NULL
 cn  connectivity                                    usr1    -   all cn_mkout NULL
 cn  connectivity\inc                                nmake   -   all cn_inc NULL
-cn  connectivity\java\sdbc_hsqldb                   nmake   -   all cn_jhsqldbdb cn_hsqldb cn_inc NULL
-cn  connectivity\java\sdbc_postgresql               nmake   -   all cn_postgresqldb cn_dbtools cn_inc NULL
+cn  connectivity\java\dbtools                       nmake   -   all cn_jdbtools cn_inc NULL
+cn  connectivity\java\sdbc_hsqldb                   nmake   -   all cn_jhsqldbdb cn_hsqldb cn_jdbtools cn_inc NULL
+cn  connectivity\java\sdbc_postgresql               nmake   -   all cn_postgresqldb cn_dbtools cn_jdbtools cn_inc NULL
 cn  connectivity\source\commontools                 nmake   -   all cn_cmtools cn_parse cn_inc NULL
 cn  connectivity\source\manager                     nmake   -   all cn_manager cn_dbtools cn_inc NULL
 cn  connectivity\source\cpool                       nmake   -   all cn_cpool cn_dbtools cn_inc NULL
diff --git a/connectivity/prj/d.lst b/connectivity/prj/d.lst
index 5fa4e80ab4a6..f1f44729b8fc 100644
--- a/connectivity/prj/d.lst
+++ b/connectivity/prj/d.lst
@@ -20,6 +20,7 @@
 ..\source\drivers\calc\*.xml %_DEST%\xml%_EXT%\*.xml
 ..\source\drivers\mysql\*.xml %_DEST%\xml%_EXT%\*.xml
 ..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar
+..\%__SRC%\class\dbtools\*.jar %_DEST%\bin%_EXT%\*.jar
 ..\%__SRC%\class\sdbc_hsqldb\*.jar %_DEST%\bin%_EXT%\*.jar
 ..\%__SRC%\class\sdbc_postgresql\*.jar %_DEST%\bin%_EXT%\*.jar
 
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index b2b360661425..61d491a5f1a7 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -432,6 +432,7 @@ STD_JAR_FILE( gid_File_Jar_Hsqldb_Sdbc, sdbc_hsqldb )
 #ifndef SYSTEM_APACHE_COMMONS
 STD_JAR_FILE( gid_File_Jar_Apache_Commons_Lang, commons-lang3-3.3 )
 #endif
+STD_JAR_FILE( gid_File_Jar_DbTools_Sdbc, dbtools )
 STD_JAR_FILE( gid_File_Jar_PostgreSQL_Sdbc, sdbc_postgresql )
 #endif
 
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 6830bfa813af..5a3ec550c407 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -87,6 +87,7 @@ Module gid_Module_Root_Files_3
 	gid_File_Jar_Hsqldb,
 	gid_File_Jar_Hsqldb_Sdbc,
 	gid_File_Jar_Apache_Commons_Lang,
+	gid_File_Jar_DbTools_Sdbc,
 	gid_File_Jar_PostgreSQL_Sdbc,
 	gid_File_Jar_Accessbridge,
 	gid_File_Jar_Js,


More information about the Libreoffice-commits mailing list