public class DBPartitionUtil
extends java.lang.Object
| Constructor and Description |
|---|
DBPartitionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addDBPartition(long companyId) |
static void |
forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<java.lang.Long,java.lang.Exception> unsafeConsumer) |
static long |
getCurrentCompanyId() |
static boolean |
isPartitionEnabled() |
static boolean |
removeDBPartition(long companyId) |
static void |
setDefaultCompanyId(java.sql.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<java.lang.Long,java.lang.Exception> unsafeConsumer)
throws java.lang.Exception
java.lang.Exceptionpublic static long getCurrentCompanyId()
public 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(java.sql.Connection connection)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static void setDefaultCompanyId(long companyId)
public static javax.sql.DataSource wrapDataSource(javax.sql.DataSource dataSource)
throws java.sql.SQLException
java.sql.SQLException