public interface IndexAlternativeAction
| Modifier and Type | Method and Description |
|---|---|
String |
run(ModelEntity modelEntity,
ModelIndex modelIndex,
DatabaseUtil dbUtil)
This method is used to perform alternative actions on index before it is created.
|
boolean |
shouldRun(ModelEntity modelEntity,
ModelIndex modelIndex,
DatabaseUtil dbUtil)
This method flags if alternative action should be invoked.
|
String run(ModelEntity modelEntity, ModelIndex modelIndex, DatabaseUtil dbUtil) throws SQLException, GenericEntityException
CONTRACT: Run MUST handle index creation AND persist its original name
OR ofBiz will attain to recreate it every time JIRA starts.
HINT: see DatabaseUtil.createDeclaredIndex(ModelEntity, ModelIndex) to experience ofBiz index creation.
modelEntity - model of entity containing indexmodelIndex - model of index we want to handle alternativelydbUtil - database helper class to handle many scenariosSQLExceptionGenericEntityExceptionboolean shouldRun(ModelEntity modelEntity, ModelIndex modelIndex, DatabaseUtil dbUtil) throws SQLException, GenericEntityException
CONTRACT: This function shouldn't have any side effects as it may get rerun. CONTRACT: Only one alternative action in a entity definition can return true for shouldRun OR IllegalStateException will be thrown.
modelEntity - model of entity containing indexmodelIndex - model of index we want to handle alternativelydbUtil - database helper class to handle many scenariosSQLExceptionGenericEntityExceptionCopyright © 2024 Atlassian. All rights reserved.