Package org.ofbiz.core.entity.model
Class ModelIndex
java.lang.Object
org.ofbiz.core.entity.model.ModelIndex
Generic Entity - Relation model class
- Since:
- 2.0
- Version:
- $Revision: 1.1 $
- Author:
- David E. Jones
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<IndexAlternativeAction>list of the field names included in this indexprotected ModelEntityreference to the entity this index refers toprotected Stringthe index name, used for the database index nameprotected booleanspecifies whether or not this index should include the unique constraint -
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorModelIndex(ModelEntity mainEntity, Element indexElement) XML Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlternativeAction(IndexAlternativeAction indexAlternativeAction) voidaddIndexField(String fieldName) getIndexField(int index) intthe main entity of this relationgetName()the index name, used for the database index namebooleanspecifies whether or not this index should include the unique constraintremoveIndexField(int index) voidsetMainEntity(ModelEntity mainEntity) voidvoidsetUnique(boolean unique)
-
Field Details
-
mainEntity
reference to the entity this index refers to -
name
the index name, used for the database index name -
unique
protected boolean uniquespecifies whether or not this index should include the unique constraint -
fieldNames
list of the field names included in this index -
alternativeActions
-
-
Constructor Details
-
ModelIndex
public ModelIndex()Default Constructor -
ModelIndex
XML Constructor
-
-
Method Details
-
getName
the index name, used for the database index name -
setName
-
getUnique
public boolean getUnique()specifies whether or not this index should include the unique constraint -
setUnique
public void setUnique(boolean unique) -
getMainEntity
the main entity of this relation -
setMainEntity
-
getIndexFieldsIterator
-
getIndexFieldsSize
public int getIndexFieldsSize() -
getIndexField
-
addIndexField
-
removeIndexField
-
getAlternativeIndexAction
public Optional<IndexAlternativeAction> getAlternativeIndexAction(DatabaseUtil dbUtil) throws SQLException, GenericEntityException - Throws:
SQLExceptionGenericEntityException
-
addAlternativeAction
-