Package org.h2gis.utilities
Class JDBCUrlParser
- java.lang.Object
-
- org.h2gis.utilities.JDBCUrlParser
-
public class JDBCUrlParser extends Object
Convert JDBC URL into JDBC Connection properties. Currently work with H2 and PostGreSQL DataSourceFactory- Author:
- Nicolas Fortin
-
-
Field Summary
Fields Modifier and Type Field Description static StringSPATIAL_DATASOURCE_ENDSWITHIf the property value of DataSourceFactory#OSGI_JDBC_DRIVER_NAME ends with SPATIAL_DATASOURCE_ENDSWITH then it is the wrapped spatial version of a DataSourceFactory
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Propertiesparse(String jdbcUrl)Convert JDBC URL into JDBC Connection properties
-
-
-
Field Detail
-
SPATIAL_DATASOURCE_ENDSWITH
public static final String SPATIAL_DATASOURCE_ENDSWITH
If the property value of DataSourceFactory#OSGI_JDBC_DRIVER_NAME ends with SPATIAL_DATASOURCE_ENDSWITH then it is the wrapped spatial version of a DataSourceFactory- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static Properties parse(String jdbcUrl) throws IllegalArgumentException
Convert JDBC URL into JDBC Connection properties- Parameters:
jdbcUrl- JDBC connection path- Returns:
- Properties to be used in OSGi DataSourceFactory that does not handle DataSourceFactory#JDBC_URL
- Throws:
IllegalArgumentException- Argument is not a valid JDBC connection URL or cannot be parsed by this class
-
-