public class DBPartitionUtil
extends Object
Constructor and Description |
---|
DBPartitionUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addDBPartition(long companyId) |
static void |
forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) |
static long |
getCurrentCompanyId() |
static boolean |
removeDBPartition(long companyId) |
static void |
replaceByTable(Connection connection,
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 forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer) throws Exception
Exception
public static long getCurrentCompanyId()
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, 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