com.atlassian.confluence.upgrade
Class UpgradeUtils
java.lang.Object
com.atlassian.confluence.upgrade.UpgradeUtils
public class UpgradeUtils
- extends java.lang.Object
Created by IntelliJ IDEA.
User: Tomd
Date: 31/01/2006
Time: 16:33:56
To change this template use File | Settings | File Templates.
Method Summary |
static void |
createIndex(net.sf.hibernate.Session session,
java.lang.String indexName,
java.lang.String tableName,
java.lang.String columns,
org.slf4j.Logger log)
|
static void |
dropIndex(net.sf.hibernate.Session session,
java.lang.String indexName,
java.lang.String tableName,
org.slf4j.Logger log)
|
static void |
executeDdl(net.sf.hibernate.Session session,
java.lang.String sql,
org.slf4j.Logger log)
|
static boolean |
getExistingBooleanValue(java.lang.String key)
|
static int |
getExistingIntegerValue(java.lang.String key)
|
static java.lang.String |
getExistingStringValue(java.lang.String key)
|
static net.sf.hibernate.Session |
getSession()
|
static boolean |
isDB2()
|
static boolean |
isMSSQL()
|
static boolean |
isMySQL()
|
static boolean |
isOracle()
|
static boolean |
isSybase()
|
static java.lang.String |
substituteBoolean(java.lang.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. |
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,
java.lang.String indexName,
java.lang.String tableName,
java.lang.String columns,
org.slf4j.Logger log)
throws net.sf.hibernate.HibernateException,
java.sql.SQLException
- Throws:
net.sf.hibernate.HibernateException
java.sql.SQLException
executeDdl
public static void executeDdl(net.sf.hibernate.Session session,
java.lang.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,
java.lang.String indexName,
java.lang.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 java.lang.String getExistingStringValue(java.lang.String key)
getExistingBooleanValue
public static boolean getExistingBooleanValue(java.lang.String key)
getExistingIntegerValue
public static int getExistingIntegerValue(java.lang.String key)
substituteBoolean
public static java.lang.String substituteBoolean(java.lang.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)
Copyright © 2003-2010 Atlassian. All Rights Reserved.