public final class DBUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
canReturnGeneratedKeys(String dbProductName)
Determines whether the given type of Database can return generated keys.
|
static String |
getConvertedAutoGeneratedColumnName(String dbProductName,
String columnName)
Converts upper case column name to lower case to match PostgreSQL.
|
static String |
getRegistryDBConfig()
get the registry.xml database type
|
static String |
getUserManagerDBConfig()
get the user-mgt.xml database type
|
public static String getConvertedAutoGeneratedColumnName(String dbProductName, String columnName)
dbProductName
- - eg: "MySQL,Oracle,PostgreSQL". Obtained using Connection.getMetaData().getDatabaseProductName();columnName
- - table column name to be convertedpublic static boolean canReturnGeneratedKeys(String dbProductName)
dbProductName
- - eg: "MySQL,Oracle,PostgreSQL". Obtained using Connection.getMetaData().getDatabaseProductName();public static String getRegistryDBConfig() throws Exception
Exception
Copyright © 2016 WSO2 Inc. All rights reserved.