public class DropIndexHelper extends Object
pre-8.0 was called 'DropIndexTask'. The new implementation looses DropIndexTask from extending DelayedUpgradeTask.
| Constructor and Description |
|---|
DropIndexHelper(AbstractUpgradeTask abstractUpgradeTask) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildDropIndexSql(String tableName,
String index) |
boolean |
checkIndexExists(String tableName,
String indexName)
Used to identify if index does indeed exist.
|
void |
dropIndex(String tableName,
String indexName)
Drops the index IF it exists.
|
public DropIndexHelper(AbstractUpgradeTask abstractUpgradeTask)
public void dropIndex(String tableName, String indexName) throws SQLException
HINT: Remember to remove index declaration from entitymodel.xml so it won't get recreated later. CAUTION: Indexes are created before upgrade tasks are run - do not use same index name with modified structure.
tableName - of index to drop.indexName - of index to drop.SQLException - if drop index sql doesn't fit database anymore.IllegalArgumentException - if table doesn't existDataAccessException - is internal ofBiz problemRuntimeException - wrapping GenericEntityException if entity name doesn't exist anymorepublic boolean checkIndexExists(String tableName, String indexName)
tableName - is table name NOT entityName.indexName - to check existence.IllegalArgumentException - if table doesn't existDataAccessException - is internal ofBiz problemRuntimeException - wrapping GenericEntityException if entity name doesn't exist anymoreCopyright © 2002-2019 Atlassian. All Rights Reserved.