Class ModelIndex

java.lang.Object
org.ofbiz.core.entity.model.ModelIndex

public class ModelIndex extends Object
Generic Entity - Relation model class
Since:
2.0
Version:
$Revision: 1.1 $
Author:
David E. Jones
  • Field Details

    • mainEntity

      protected ModelEntity mainEntity
      reference to the entity this index refers to
    • name

      protected String name
      the index name, used for the database index name
    • unique

      protected boolean unique
      specifies whether or not this index should include the unique constraint
    • fieldNames

      protected List<String> fieldNames
      list of the field names included in this index
    • alternativeActions

      protected List<IndexAlternativeAction> alternativeActions
  • Constructor Details

    • ModelIndex

      public ModelIndex()
      Default Constructor
    • ModelIndex

      public ModelIndex(ModelEntity mainEntity, Element indexElement)
      XML Constructor
  • Method Details

    • getName

      public String getName()
      the index name, used for the database index name
    • setName

      public void setName(String name)
    • getUnique

      public boolean getUnique()
      specifies whether or not this index should include the unique constraint
    • setUnique

      public void setUnique(boolean unique)
    • getMainEntity

      public ModelEntity getMainEntity()
      the main entity of this relation
    • setMainEntity

      public void setMainEntity(ModelEntity mainEntity)
    • getIndexFieldsIterator

      public Iterator<String> getIndexFieldsIterator()
    • getIndexFieldsSize

      public int getIndexFieldsSize()
    • getIndexField

      public String getIndexField(int index)
    • addIndexField

      public void addIndexField(String fieldName)
    • removeIndexField

      public String removeIndexField(int index)
    • getAlternativeIndexAction

      public Optional<IndexAlternativeAction> getAlternativeIndexAction(DatabaseUtil dbUtil) throws SQLException, GenericEntityException
      Throws:
      SQLException
      GenericEntityException
    • addAlternativeAction

      public void addAlternativeAction(IndexAlternativeAction indexAlternativeAction)