Class ModelViewEntity

java.lang.Object
org.apache.ofbiz.entity.model.ModelEntity
org.apache.ofbiz.entity.model.ModelViewEntity
All Implemented Interfaces:
Serializable, Comparable<ModelEntity>

public class ModelViewEntity extends ModelEntity
This class extends ModelEntity and provides additional information appropriate to view entities
See Also:
  • Constructor Details

  • Method Details

    • getMemberModelMemberEntities

      public Map<String,ModelViewEntity.ModelMemberEntity> getMemberModelMemberEntities()
      Gets member model member entities.
      Returns:
      the member model member entities
    • getAllModelMemberEntities

      public List<ModelViewEntity.ModelMemberEntity> getAllModelMemberEntities()
      Gets all model member entities.
      Returns:
      the all model member entities
    • getMemberModelMemberEntity

      public ModelViewEntity.ModelMemberEntity getMemberModelMemberEntity(String alias)
      Gets member model member entity.
      Parameters:
      alias - the alias
      Returns:
      the member model member entity
    • getMemberModelEntity

      public ModelEntity getMemberModelEntity(String alias)
      Gets member model entity.
      Parameters:
      alias - the alias
      Returns:
      the member model entity
    • addMemberModelMemberEntity

      public void addMemberModelMemberEntity(ModelViewEntity.ModelMemberEntity modelMemberEntity)
      Add member model member entity.
      Parameters:
      modelMemberEntity - the model member entity
    • removeMemberModelMemberEntity

      public void removeMemberModelMemberEntity(String alias)
      Remove member model member entity.
      Parameters:
      alias - the alias
    • getColNameOrAlias

      public String getColNameOrAlias(String fieldName)
      The col-name of the Field, the alias of the field if this is on a view-entity
      Overrides:
      getColNameOrAlias in class ModelEntity
      Returns:
      the col name or alias
    • getAlias

      public ModelViewEntity.ModelAlias getAlias(int index)
      List of aliases with information in addition to what is in the standard field list
    • getAlias

      public ModelViewEntity.ModelAlias getAlias(String name)
      Gets alias.
      Parameters:
      name - the name
      Returns:
      the alias
    • getAliasesSize

      public int getAliasesSize()
      Gets aliases size.
      Returns:
      the aliases size
    • getAliasesIterator

      public Iterator<ModelViewEntity.ModelAlias> getAliasesIterator()
      Gets aliases iterator.
      Returns:
      the aliases iterator
    • getAliasesCopy

      public List<ModelViewEntity.ModelAlias> getAliasesCopy()
      Gets aliases copy.
      Returns:
      the aliases copy
    • getGroupBysSize

      public int getGroupBysSize()
      Gets group bys size.
      Returns:
      the group bys size
    • getGroupBysCopy

      public List<ModelField> getGroupBysCopy()
      Gets group bys copy.
      Returns:
      the group bys copy
    • getGroupBysCopy

      public List<ModelField> getGroupBysCopy(List<ModelField> selectFields)
      Gets group bys copy.
      Parameters:
      selectFields - the select fields
      Returns:
      the group bys copy
    • getViewLink

      public ModelViewEntity.ModelViewLink getViewLink(int index)
      List of view links to define how entities are connected (or "joined")
    • getViewLinksSize

      public int getViewLinksSize()
      Gets view links size.
      Returns:
      the view links size
    • getViewLinksIterator

      public Iterator<ModelViewEntity.ModelViewLink> getViewLinksIterator()
      Gets view links iterator.
      Returns:
      the view links iterator
    • getViewLinksCopy

      public List<ModelViewEntity.ModelViewLink> getViewLinksCopy()
      Gets view links copy.
      Returns:
      the view links copy
    • addViewLink

      public void addViewLink(ModelViewEntity.ModelViewLink viewLink)
      Add view link.
      Parameters:
      viewLink - the view link
    • populateViewEntityConditionInformation

      public void populateViewEntityConditionInformation(ModelFieldTypeReader modelFieldTypeReader, List<EntityCondition> whereConditions, List<EntityCondition> havingConditions, List<String> orderByList, List<String> entityAliasStack)
      Populate view entity condition information.
      Parameters:
      modelFieldTypeReader - the model field type reader
      whereConditions - the where conditions
      havingConditions - the having conditions
      orderByList - the order by list
      entityAliasStack - the entity alias stack
    • colNameString

      @Deprecated public String colNameString(String separator, String afterLast, boolean alias, ModelField... flds)
      Deprecated.
      Description copied from class: ModelEntity
      Col name string string.
      Overrides:
      colNameString in class ModelEntity
      Parameters:
      separator - the separator
      afterLast - the after last
      alias - the alias
      flds - the flds
      Returns:
      the string
    • colNameString

      public StringBuilder colNameString(StringBuilder sb, String prefix, String separator, String afterLast, boolean alias, ModelField... flds)
      Description copied from class: ModelEntity
      Col name string string builder.
      Overrides:
      colNameString in class ModelEntity
      Parameters:
      sb - the sb
      prefix - the prefix
      separator - the separator
      afterLast - the after last
      alias - the alias
      flds - the flds
      Returns:
      the string builder
    • colNameString

      @Deprecated public String colNameString(List<ModelField> flds, String separator, String afterLast, boolean alias)
      Deprecated.
      Description copied from class: ModelEntity
      Col name string string.
      Overrides:
      colNameString in class ModelEntity
      Parameters:
      flds - the flds
      separator - the separator
      afterLast - the after last
      alias - the alias
      Returns:
      the string
    • colNameString

      public StringBuilder colNameString(List<ModelField> flds, StringBuilder sb, String prefix, String separator, String afterLast, boolean alias)
      Description copied from class: ModelEntity
      Col name string string builder.
      Overrides:
      colNameString in class ModelEntity
      Parameters:
      flds - the flds
      sb - the sb
      prefix - the prefix
      separator - the separator
      afterLast - the after last
      alias - the alias
      Returns:
      the string builder
    • getAliasedModelEntity

      public ModelEntity getAliasedModelEntity()
      Gets aliased model entity.
      Returns:
      the aliased model entity
    • getAliasedEntity

      public ModelEntity getAliasedEntity(String entityAlias, ModelReader modelReader)
      Gets aliased entity.
      Parameters:
      entityAlias - the entity alias
      modelReader - the model reader
      Returns:
      the aliased entity
    • getAliasedField

      public ModelField getAliasedField(ModelEntity aliasedEntity, String field, ModelReader modelReader)
      Gets aliased field.
      Parameters:
      aliasedEntity - the aliased entity
      field - the field
      modelReader - the model reader
      Returns:
      the aliased field
    • populateFields

      public void populateFields(ModelReader modelReader)
      Populate fields.
      Parameters:
      modelReader - the model reader
    • populateFieldsBasic

      public void populateFieldsBasic(ModelReader modelReader)
      Populate fields basic.
      Parameters:
      modelReader - the model reader
    • getOrCreateModelConversion

      protected ModelViewEntity.ModelConversion getOrCreateModelConversion(String aliasName)
      Gets or create model conversion.
      Parameters:
      aliasName - the alias name
      Returns:
      the or create model conversion
    • populateReverseLinks

      public void populateReverseLinks()
      Populate reverse links.
    • convert

      public List<Map<String,Object>> convert(String fromEntityName, Map<String,? extends Object> data)
      Convert list.
      Parameters:
      fromEntityName - the from entity name
      data - the data
      Returns:
      the list
    • toString

      public String toString()
      Overrides:
      toString in class ModelEntity