public class DBPartitionUtil
extends java.lang.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<java.lang.Long,java.lang.Exception> unsafeConsumer) |
static java.util.List<java.lang.String> |
getConfigurationPids(long companyId) |
static java.util.Map<java.lang.String,java.lang.String> |
getConfigurations(long companyId) |
static java.lang.String |
getPartitionName(long companyId) |
static boolean |
insertDBPartition(long companyId) |
static boolean |
removeDBPartition(long companyId) |
static void |
replaceByTable(java.sql.Connection connection,
boolean copyData,
java.lang.String viewName) |
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 checkDatabasePartitionSchemaNamePrefix()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static boolean copyDBPartition(long fromCompanyId,
long toCompanyId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static boolean extractDBPartition(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 java.util.List<java.lang.String> getConfigurationPids(long companyId)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.util.Map<java.lang.String,java.lang.String> getConfigurations(long companyId)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getPartitionName(long companyId)
public static boolean insertDBPartition(long companyId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static boolean removeDBPartition(long companyId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void replaceByTable(java.sql.Connection connection,
boolean copyData,
java.lang.String viewName)
throws java.lang.Exception
java.lang.Exceptionpublic 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