com.atlassian.confluence.upgrade
Class UpgradeUtils
java.lang.Object
com.atlassian.confluence.upgrade.UpgradeUtils
public class UpgradeUtils
- extends Object
Created by IntelliJ IDEA.
User: Tomd
Date: 31/01/2006
Time: 16:33:56
To change this template use File | Settings | File Templates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpgradeUtils
public UpgradeUtils()
createIndex
public static void createIndex(net.sf.hibernate.Session session,
String indexName,
String tableName,
String columns,
org.slf4j.Logger log)
throws net.sf.hibernate.HibernateException,
SQLException
- Throws:
net.sf.hibernate.HibernateException
SQLException
executeDdl
public static void executeDdl(net.sf.hibernate.Session session,
String sql,
org.slf4j.Logger log)
throws net.sf.hibernate.HibernateException
- Throws:
net.sf.hibernate.HibernateException
getSession
public static net.sf.hibernate.Session getSession()
dropIndex
public static void dropIndex(net.sf.hibernate.Session session,
String indexName,
String tableName,
org.slf4j.Logger log)
throws net.sf.hibernate.HibernateException
- Throws:
net.sf.hibernate.HibernateException
isMySQL
public static boolean isMySQL()
isMSSQL
public static boolean isMSSQL()
isSybase
public static boolean isSybase()
isOracle
public static boolean isOracle()
isDB2
public static boolean isDB2()
getExistingStringValue
public static String getExistingStringValue(String key)
getExistingBooleanValue
public static boolean getExistingBooleanValue(String key)
getExistingIntegerValue
public static int getExistingIntegerValue(String key)
substituteBoolean
public static String substituteBoolean(String sqlString)
- Returns the converted SQL string with booleans converted from True or false
to 1 or 0 respectively based on the isSubstituteBoolean() method that looks for databases which
require the boolean values as 1 or 0.
If the database requires does not require boolean substitution, then the original sql string will be returned
unmodified.
- Parameters:
sqlString
- the raw sql query string
- Returns:
- the converted sql string. (unmodified if the database supports true false boolean values).
- See Also:
substituteBoolean(String)