public class DBPartitionUtil
extends Object
Constructor and Description |
---|
DBPartitionUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addDBPartition(long companyId) |
static void |
checkDatabasePartitionSchemaNamePrefix() |
static boolean |
copyDBPartition(long fromCompanyId,
long toCompanyId) |
static boolean |
extractDBPartition(long companyId) |
static void |
forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) |
static List<String> |
getConfigurationPids(long companyId) |
static Map<String,String> |
getConfigurations(long companyId) |
static boolean |
insertDBPartition(long companyId) |
static boolean |
removeDBPartition(long companyId) |
static void |
replaceByTable(Connection connection,
boolean copyData,
String viewName) |
static void |
setDefaultCompanyId(Connection connection) |
static void |
setDefaultCompanyId(long companyId) |
static javax.sql.DataSource |
wrapDataSource(javax.sql.DataSource dataSource) |
public static boolean addDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void checkDatabasePartitionSchemaNamePrefix() throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static boolean copyDBPartition(long fromCompanyId, long toCompanyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static boolean extractDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) throws Exception
Exception
public static List<String> getConfigurationPids(long companyId) throws SQLException
SQLException
public static Map<String,String> getConfigurations(long companyId) throws SQLException
SQLException
public static boolean insertDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static boolean removeDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void replaceByTable(Connection connection, boolean copyData, String viewName) throws Exception
Exception
public static void setDefaultCompanyId(Connection connection) throws SQLException
SQLException
public static void setDefaultCompanyId(long companyId)
public static javax.sql.DataSource wrapDataSource(javax.sql.DataSource dataSource) throws SQLException
SQLException