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 boolean |
isPartitionEnabled() |
static boolean |
removeDBPartition(long companyId) |
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.PortalExceptionpublic static void forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long,Exception> unsafeConsumer)
throws Exception
Exceptionpublic static boolean isPartitionEnabled()
public static boolean removeDBPartition(long companyId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void setDefaultCompanyId(Connection connection)
throws SQLException
SQLExceptionpublic static void setDefaultCompanyId(long companyId)
public static javax.sql.DataSource wrapDataSource(javax.sql.DataSource dataSource)
throws SQLException
SQLException