Class ModelIndex

java.lang.Object
org.apache.ofbiz.entity.model.ModelChild
org.apache.ofbiz.entity.model.ModelIndex
All Implemented Interfaces:
Serializable

@ThreadSafe public final class ModelIndex extends ModelChild
An object that models the <index> element.
See Also:
  • Method Details

    • create

      public static ModelIndex create(ModelEntity modelEntity, String description, String name, List<ModelIndex.Field> fields, boolean unique)
      Returns a new ModelIndex instance, initialized with the specified values.
      Parameters:
      modelEntity - The ModelEntity this index is a member of.
      description - The index description.
      name - The index name.
      fields - The fields that are included in this index.
      unique - true if this index returns unique values.
    • create

      public static ModelIndex create(ModelEntity modelEntity, Element indexElement)
      Returns a new ModelIndex instance, initialized with the specified values.
      Parameters:
      modelEntity - The ModelEntity this index is a member of.
      indexElement - The <index> element containing the values for this index.
    • getName

      public String getName()
      Returns the index name.
    • getUnique

      public boolean getUnique()
      Returns true if this index returns unique values.
    • getFields

      public List<ModelIndex.Field> getFields()
      Returns the fields included in this index.
    • toXmlElement

      public Element toXmlElement(Document document)