Class DBPartitionUtil
Object
com.liferay.portal.db.partition.util.DBPartitionUtil
- Author:
- Alberto Chaparro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddDBPartition(long companyId) static voidstatic booleancopyDBPartition(long fromCompanyId, long toCompanyId) static booleanexportCompany(long companyId) static voidexportConfiguration(long companyId, String configurationId, String dictionaryString) static booleanexportDBPartition(long companyId) static voidforEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long, Exception> unsafeConsumer) getConfigurationPids(long companyId) getConfigurations(long companyId) static StringgetPartitionKey(Object key) static StringgetPartitionKey(String key, com.liferay.portal.kernel.model.ShardedModel shardedModel) static StringgetPartitionName(long companyId) static booleanimportDBPartition(long companyId) static booleanremoveDBPartition(long companyId) static voidreplaceByTable(Connection connection, long companyId, String viewName, boolean copyData) static voidsetDefaultCompanyId(long companyId) static voidsetDefaultCompanyId(Connection connection) static DataSourcewrapDataSource(DataSource dataSource)
-
Constructor Details
-
DBPartitionUtil
public DBPartitionUtil()
-
-
Method Details
-
addDBPartition
public static boolean addDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkDatabasePartitionSchemaNamePrefix
public static void checkDatabasePartitionSchemaNamePrefix() throws com.liferay.portal.kernel.exception.PortalException- Throws:
com.liferay.portal.kernel.exception.PortalException
-
copyDBPartition
public static boolean copyDBPartition(long fromCompanyId, long toCompanyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
exportCompany
public static boolean exportCompany(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
exportConfiguration
public static void exportConfiguration(long companyId, String configurationId, String dictionaryString) throws SQLException - Throws:
SQLException
-
exportDBPartition
public static boolean exportDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
forEachCompanyId
public static void forEachCompanyId(com.liferay.petra.function.UnsafeConsumer<Long, Exception> unsafeConsumer) throws Exception- Throws:
Exception
-
getConfigurationPids
- Throws:
SQLException
-
getConfigurations
- Throws:
SQLException
-
getPartitionKey
-
getPartitionKey
-
getPartitionName
-
importDBPartition
public static boolean importDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
removeDBPartition
public static boolean removeDBPartition(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
replaceByTable
public static void replaceByTable(Connection connection, long companyId, String viewName, boolean copyData) throws Exception - Throws:
Exception
-
setDefaultCompanyId
- Throws:
SQLException
-
setDefaultCompanyId
public static void setDefaultCompanyId(long companyId) -
wrapDataSource
- Throws:
SQLException
-