ch.sahits.codegen.util
Class DTPConnectionParser

java.lang.Object
  extended by ch.sahits.codegen.util.DTPConnectionParser

public class DTPConnectionParser
extends java.lang.Object

This Parser can retrieve stuff from the connection URL that are not suplied in the properties of a IConnectionProfile.
Since the connection URL is vendor specific the vendor must be suplied. The following vendors are supported:

Since:
1.1.1
Author:
Andi Hotz

Constructor Summary
DTPConnectionParser(java.lang.String vendorName)
          Constructor initializes the vendor The vendor can be retrieved from the IConnectionProfile by profile.getBaseProperties().getProperty("org.eclipse.datatools.connectivity.db.vendor").toString().toUpperCase();
 
Method Summary
 java.lang.String getHost(java.lang.String connectionURL)
          Retrieve the host name from the connection URL The host my be a location in a network or a local file
 int getPort(java.lang.String connectionURL)
          Retrieve the port number from the connection URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTPConnectionParser

public DTPConnectionParser(java.lang.String vendorName)
Constructor initializes the vendor The vendor can be retrieved from the IConnectionProfile by
profile.getBaseProperties().getProperty("org.eclipse.datatools.connectivity.db.vendor").toString().toUpperCase();

Parameters:
vendorName - name of the database vendor.
Method Detail

getPort

public int getPort(java.lang.String connectionURL)
Retrieve the port number from the connection URL. If the database does not need any port number 0 is returned

Parameters:
connectionURL - JDBC Connection URL
Returns:
port number

getHost

public java.lang.String getHost(java.lang.String connectionURL)
Retrieve the host name from the connection URL The host my be a location in a network or a local file

Parameters:
connectionURL - JDBC Connection URL
Returns:
name of the host