public class ModelIndex extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<IndexAlternativeAction> |
alternativeActions |
protected List<String> |
fieldNames
list of the field names included in this index
|
protected ModelEntity |
mainEntity
reference to the entity this index refers to
|
protected String |
name
the index name, used for the database index name
|
protected boolean |
unique
specifies whether or not this index should include the unique constraint
|
| Constructor and Description |
|---|
ModelIndex()
Default Constructor
|
ModelIndex(ModelEntity mainEntity,
Element indexElement)
XML Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAlternativeAction(IndexAlternativeAction indexAlternativeAction) |
void |
addIndexField(String fieldName) |
Optional<IndexAlternativeAction> |
getAlternativeIndexAction(DatabaseUtil dbUtil) |
String |
getIndexField(int index) |
Iterator<String> |
getIndexFieldsIterator() |
int |
getIndexFieldsSize() |
ModelEntity |
getMainEntity()
the main entity of this relation
|
String |
getName()
the index name, used for the database index name
|
boolean |
getUnique()
specifies whether or not this index should include the unique constraint
|
String |
removeIndexField(int index) |
void |
setMainEntity(ModelEntity mainEntity) |
void |
setName(String name) |
void |
setUnique(boolean unique) |
protected ModelEntity mainEntity
protected String name
protected boolean unique
protected List<IndexAlternativeAction> alternativeActions
public ModelIndex()
public ModelIndex(ModelEntity mainEntity, Element indexElement)
public String getName()
public void setName(String name)
public boolean getUnique()
public void setUnique(boolean unique)
public ModelEntity getMainEntity()
public void setMainEntity(ModelEntity mainEntity)
public int getIndexFieldsSize()
public String getIndexField(int index)
public void addIndexField(String fieldName)
public String removeIndexField(int index)
public Optional<IndexAlternativeAction> getAlternativeIndexAction(DatabaseUtil dbUtil) throws SQLException, GenericEntityException
SQLExceptionGenericEntityExceptionpublic void addAlternativeAction(IndexAlternativeAction indexAlternativeAction)
Copyright © 2018 Atlassian. All rights reserved.