Author: damjan
Date: Tue Sep 19 02:20:32 2017
New Revision: 1808811

URL: http://svn.apache.org/viewvc?rev=1808811&view=rev
Log:
Implement XServiceInfo in all the Java SDBCX classes and standardize it
to a common form.

Patch by: me


Modified:
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java
    
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/PostgresqlDriver.java
 Tue Sep 19 02:20:32 2017
@@ -89,7 +89,7 @@ public class PostgresqlDriver extends Co
     
     @Override
     public boolean supportsService(String serviceName) {
-        for (String service : services) {
+        for (String service : getSupportedServiceNames()) {
             if (service.equals(serviceName)) {
                 return true;
             }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OColumn.java
 Tue Sep 19 02:20:32 2017
@@ -24,6 +24,7 @@ package com.sun.star.sdbcx.comp.postgres
 import com.sun.star.beans.PropertyAttribute;
 import com.sun.star.beans.XPropertySet;
 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;
@@ -33,7 +34,12 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class OColumn extends ODescriptor implements XNamed, 
XDataDescriptorFactory {
+public class OColumn extends ODescriptor implements XNamed, 
XDataDescriptorFactory, XServiceInfo {
+    
+    private static final String[] services = {
+            "com.sun.star.sdbcx.Column"
+    };
+    
     private String typeName;
     private String description;
     private String defaultValue;
@@ -234,6 +240,27 @@ public class OColumn extends ODescriptor
         super.postDisposing();
     }
     
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
     // XDataDescriptorFactory
     
     @Override

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OContainer.java
 Tue Sep 19 02:20:32 2017
@@ -128,7 +128,7 @@ public abstract class OContainer extends
     // XServiceInfo
     
     public String getImplementationName() {
-        return "com.sun.star.sdbcx.VContainer";
+        return getClass().getName();
     }
     
     @Override
@@ -138,7 +138,7 @@ public abstract class OContainer extends
     
     @Override
     public boolean supportsService(String serviceName) {
-        for (String service : services) {
+        for (String service : getSupportedServiceNames()) {
             if (service.equals(serviceName)) {
                 return true;
             }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndex.java
 Tue Sep 19 02:20:32 2017
@@ -27,6 +27,7 @@ import com.sun.star.beans.PropertyAttrib
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
 import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import com.sun.star.sdbcx.XDataDescriptorFactory;
@@ -37,7 +38,12 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class OIndex extends ODescriptor implements XColumnsSupplier, 
XDataDescriptorFactory {
+public class OIndex extends ODescriptor implements XColumnsSupplier, 
XDataDescriptorFactory, XServiceInfo {
+    
+    private static final String[] services = {
+            "com.sun.star.sdbcx.Index"
+    };
+
     protected String catalogName;
     protected boolean isUnique;
     protected boolean isPrimaryKeyIndex;
@@ -87,6 +93,29 @@ public class OIndex extends ODescriptor
                     }
                 }, null);
     }
+
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    // XDataDescriptorFactory
     
     @Override
     public XPropertySet createDataDescriptor() {

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OIndexColumn.java
 Tue Sep 19 02:20:32 2017
@@ -23,13 +23,19 @@ package com.sun.star.sdbcx.comp.postgres
 
 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 {
+public class OIndexColumn extends OColumn implements XServiceInfo {
+    
+    private static final String[] services = {
+            "com.sun.star.sdbcx.IndexColumn"
+    };
+
     protected boolean isAscending;
     
     public OIndexColumn(
@@ -63,6 +69,27 @@ public class OIndexColumn extends OColum
                 }, null);
     }
     
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }    
+    
     // XDataDescriptorFactory
     
     @Override

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKey.java
 Tue Sep 19 02:20:32 2017
@@ -27,6 +27,7 @@ import com.sun.star.beans.PropertyAttrib
 import com.sun.star.beans.XPropertySet;
 import com.sun.star.container.ElementExistException;
 import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbc.SQLException;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import com.sun.star.sdbcx.XDataDescriptorFactory;
@@ -38,8 +39,12 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.uno.Type;
 
 public class OKey extends ODescriptor
-        implements XDataDescriptorFactory, XColumnsSupplier {
-    
+        implements XDataDescriptorFactory, XColumnsSupplier, XServiceInfo {
+
+    private static final String[] services = {
+            "com.sun.star.sdbcx.Key"
+    };
+
     protected OTable table;
     protected String referencedTable;
     protected int type;
@@ -130,5 +135,24 @@ public class OKey extends ODescriptor
                 + ", name=" + getName() + "]";
     }
     
+    // XServiceInfo
     
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OKeyColumn.java
 Tue Sep 19 02:20:32 2017
@@ -23,13 +23,19 @@ package com.sun.star.sdbcx.comp.postgres
 
 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.SdbcxKeyColumnDescriptor;
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class OKeyColumn extends OColumn {
+public class OKeyColumn extends OColumn implements XServiceInfo {
+    
+    private static final String[] services = {
+            "com.sun.star.sdbcx.KeyColumn"
+    };
+    
     protected String referencedColumn;
     
     protected OKeyColumn(boolean isCaseSensitive) {
@@ -67,7 +73,28 @@ public class OKeyColumn extends OColumn
                     }
                 }, null);
     }
+
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
     
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     // XDataDescriptorFactory
     
     @Override

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/OTable.java
 Tue Sep 19 02:20:32 2017
@@ -117,7 +117,7 @@ public abstract class OTable extends ODe
     
     @Override
     public String getImplementationName() {
-        return "com.sun.star.sdbcx.Table";
+        return getClass().getName();
     }
     
     @Override
@@ -127,7 +127,7 @@ public abstract class OTable extends ODe
     
     @Override
     public boolean supportsService(String serviceName) {
-        for (String service : services) {
+        for (String service : getSupportedServiceNames()) {
             if (serviceName.equals(service)) {
                 return true;
             }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxColumnDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -21,13 +21,18 @@
 
 package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
 
+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 {
+public class SdbcxColumnDescriptor extends ODescriptor implements XServiceInfo 
{
+    private static final String[] services = {
+            "com.sun.star.sdbcx.ColumnDescriptor"
+    };
+    
     protected int type;
     protected String typeName;
     protected int precision;
@@ -186,4 +191,26 @@ public class SdbcxColumnDescriptor exten
                     }
                 });
     }
+    
+    // XServiceInfo
+    
+    @Override
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexColumnDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -21,12 +21,18 @@
 
 package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
 
+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 SdbcxIndexColumnDescriptor extends SdbcxColumnDescriptor {
+public class SdbcxIndexColumnDescriptor extends SdbcxColumnDescriptor 
implements XServiceInfo {
+
+    private static final String[] services = {
+            "com.sun.star.sdbcx.IndexColumnDescriptor"
+    };
+
     protected boolean isAscending;
     
     public SdbcxIndexColumnDescriptor(boolean isCaseSensitive) {
@@ -50,4 +56,25 @@ public class SdbcxIndexColumnDescriptor
                     }
                 });
     }
+    
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxIndexDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -21,6 +21,7 @@
 
 package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
 
+import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import 
com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
 import 
com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
@@ -28,7 +29,11 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class SdbcxIndexDescriptor extends ODescriptor implements 
XColumnsSupplier {
+public class SdbcxIndexDescriptor extends ODescriptor implements 
XColumnsSupplier, XServiceInfo {
+    private static final String[] services = {
+            "com.sun.star.sdbcx.IndexDescriptor"
+    };
+
     protected String catalog = "";
     protected boolean isUnique;
     protected boolean isClustered;
@@ -86,4 +91,26 @@ public class SdbcxIndexDescriptor extend
     public SdbcxIndexColumnDescriptorContainer getColumns() {
         return columns;
     }
+    
+    // XServiceInfo
+    
+    @Override
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyColumnDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -21,12 +21,17 @@
 
 package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
 
+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 {
+public class SdbcxKeyColumnDescriptor extends SdbcxColumnDescriptor implements 
XServiceInfo {
+    private static final String[] services = {
+            "com.sun.star.sdbcx.KeyColumnDescriptor"
+    };
+    
     protected String relatedColumn;
     
     public SdbcxKeyColumnDescriptor(boolean isCaseSensitive) {
@@ -50,4 +55,25 @@ public class SdbcxKeyColumnDescriptor ex
                     }
                 });
     }
+    
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxKeyDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -22,6 +22,7 @@
 package com.sun.star.sdbcx.comp.postgresql.sdbcx.descriptors;
 
 import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import 
com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
 import 
com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertySetter;
@@ -29,7 +30,12 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class SdbcxKeyDescriptor extends ODescriptor implements 
XColumnsSupplier {
+public class SdbcxKeyDescriptor extends ODescriptor implements 
XColumnsSupplier, XServiceInfo {
+    
+    private static final String[] services = {
+            "com.sun.star.sdbcx.KeyDescriptor"
+    };
+    
     protected int type;
     protected String referencedTable;
     protected int updateRule;
@@ -105,4 +111,25 @@ public class SdbcxKeyDescriptor extends
     public XNameAccess getColumns() {
         return columns;
     }
+    
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

Modified: 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java?rev=1808811&r1=1808810&r2=1808811&view=diff
==============================================================================
--- 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java
 (original)
+++ 
openoffice/trunk/main/connectivity/java/sdbc_postgresql/src/com/sun/star/sdbcx/comp/postgresql/sdbcx/descriptors/SdbcxTableDescriptor.java
 Tue Sep 19 02:20:32 2017
@@ -23,6 +23,7 @@ package com.sun.star.sdbcx.comp.postgres
 
 import com.sun.star.container.XIndexAccess;
 import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.XServiceInfo;
 import com.sun.star.sdbcx.XColumnsSupplier;
 import com.sun.star.sdbcx.XKeysSupplier;
 import 
com.sun.star.sdbcx.comp.postgresql.comphelper.PropertySetAdapter.PropertyGetter;
@@ -32,7 +33,12 @@ import com.sun.star.sdbcx.comp.postgresq
 import com.sun.star.sdbcx.comp.postgresql.util.PropertyIds;
 import com.sun.star.uno.Type;
 
-public class SdbcxTableDescriptor extends ODescriptor implements 
XColumnsSupplier, XKeysSupplier {
+public class SdbcxTableDescriptor extends ODescriptor implements 
XColumnsSupplier, XKeysSupplier, XServiceInfo {
+
+    private static final String[] services = {
+            "com.sun.star.sdbcx.TableDescriptor"
+    };
+    
     protected String catalogName;
     protected String schemaName;
     protected String description;
@@ -101,4 +107,25 @@ public class SdbcxTableDescriptor extend
     public XIndexAccess getKeys() {
         return keys;
     }
+    
+    // XServiceInfo
+    
+    public String getImplementationName() {
+        return getClass().getName();
+    }
+    
+    @Override
+    public String[] getSupportedServiceNames() {
+        return services.clone();
+    }
+    
+    @Override
+    public boolean supportsService(String serviceName) {
+        for (String service : getSupportedServiceNames()) {
+            if (service.equals(serviceName)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }


Reply via email to