Package net.postgis.jdbc.geometry.util
Class VersionUtil
- java.lang.Object
-
- net.postgis.jdbc.geometry.util.VersionUtil
-
public class VersionUtil extends Object
Utility for working with PostGIS Server version.- Author:
- Phillip Ross
-
-
Field Summary
Fields Modifier and Type Field Description static StringNONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENTThe string to match when determining a function does not exist from the content of an error message.static StringPOSTGIS_SERVER_VERSION_SEPERATORThe token which separates version components within the PostGIS Server version.
-
Constructor Summary
Constructors Constructor Description VersionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetVersionString(Connection connection, String function)Query a specific version string from the datasource for a specified function.static StringretrievePostGISServerMajorVersion(Connection connection)static StringretrievePostGISServerMinorVersion(Connection connection)static StringretrievePostGISServerVersion(Connection connection)static StringretrievePostGISServerVersionString(Connection connection)
-
-
-
Field Detail
-
NONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENT
public static final String NONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENT
The string to match when determining a function does not exist from the content of an error message.- See Also:
- Constant Field Values
-
POSTGIS_SERVER_VERSION_SEPERATOR
public static final String POSTGIS_SERVER_VERSION_SEPERATOR
The token which separates version components within the PostGIS Server version.- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersionString
public static String getVersionString(Connection connection, String function) throws SQLException
Query a specific version string from the datasource for a specified function.- Parameters:
connection- The connection to issue the version query function against.function- The version function to use for querying the version.- Returns:
- a string version for the specified function.
- Throws:
SQLException- when a jdbc exception occurs.
-
retrievePostGISServerVersionString
public static String retrievePostGISServerVersionString(Connection connection) throws SQLException
- Throws:
SQLException
-
retrievePostGISServerVersion
public static String retrievePostGISServerVersion(Connection connection) throws SQLException
- Throws:
SQLException
-
retrievePostGISServerMajorVersion
public static String retrievePostGISServerMajorVersion(Connection connection) throws SQLException
- Throws:
SQLException
-
retrievePostGISServerMinorVersion
public static String retrievePostGISServerMinorVersion(Connection connection) throws SQLException
- Throws:
SQLException
-
-