org.ofbiz.entity.model
Class ModelIndex

java.lang.Object
  extended by org.ofbiz.entity.model.ModelChild
      extended by org.ofbiz.entity.model.ModelIndex
All Implemented Interfaces:
java.io.Serializable

public class ModelIndex
extends ModelChild

Generic Entity - Relation model class

See Also:
Serialized Form

Field Summary
protected  java.util.List<java.lang.String> fieldNames
          list of the field names included in this index
protected  java.lang.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
 
Fields inherited from class org.ofbiz.entity.model.ModelChild
description, parentModelEntity
 
Constructor Summary
ModelIndex()
          Default Constructor
ModelIndex(ModelEntity mainEntity, org.w3c.dom.Element indexElement)
          XML Constructor
ModelIndex(ModelEntity mainEntity, java.lang.String name, boolean unique)
          Direct Create Constructor
 
Method Summary
 void addIndexField(java.lang.String fieldName)
           
 java.lang.String getIndexField(int index)
           
 java.util.Iterator<java.lang.String> getIndexFieldsIterator()
           
 int getIndexFieldsSize()
           
 ModelEntity getMainEntity()
          Deprecated. the main entity of this relation
 java.lang.String getName()
          the index name, used for the database index name
 boolean getUnique()
          specifies whether or not this index should include the unique constraint
 java.lang.String removeIndexField(int index)
           
 void setMainEntity(ModelEntity mainEntity)
          Deprecated.  
 void setName(java.lang.String name)
           
 void setUnique(boolean unique)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)
           
 
Methods inherited from class org.ofbiz.entity.model.ModelChild
getDescription, getModelEntity, setDescription, setModelEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.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 java.util.List<java.lang.String> fieldNames
list of the field names included in this index

Constructor Detail

ModelIndex

public ModelIndex()
Default Constructor


ModelIndex

public ModelIndex(ModelEntity mainEntity,
                  java.lang.String name,
                  boolean unique)
Direct Create Constructor


ModelIndex

public ModelIndex(ModelEntity mainEntity,
                  org.w3c.dom.Element indexElement)
XML Constructor

Method Detail

getName

public java.lang.String getName()
the index name, used for the database index name


setName

public void setName(java.lang.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()
Deprecated. the main entity of this relation


setMainEntity

public void setMainEntity(ModelEntity mainEntity)
Deprecated. 


getIndexFieldsIterator

public java.util.Iterator<java.lang.String> getIndexFieldsIterator()

getIndexFieldsSize

public int getIndexFieldsSize()

getIndexField

public java.lang.String getIndexField(int index)

addIndexField

public void addIndexField(java.lang.String fieldName)

removeIndexField

public java.lang.String removeIndexField(int index)

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)