Package org.apache.ofbiz.entity.model
Class ModelViewEntity
- java.lang.Object
-
- org.apache.ofbiz.entity.model.ModelEntity
-
- org.apache.ofbiz.entity.model.ModelViewEntity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModelEntity>
public class ModelViewEntity extends ModelEntity
This class extends ModelEntity and provides additional information appropriate to view entities- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelViewEntity.ComplexAlias
static class
ModelViewEntity.ComplexAliasField
static interface
ModelViewEntity.ComplexAliasMember
static class
ModelViewEntity.ModelAlias
static class
ModelViewEntity.ModelAliasAll
class
ModelViewEntity.ModelConversion
static class
ModelViewEntity.ModelMemberEntity
static class
ModelViewEntity.ModelViewLink
static interface
ModelViewEntity.ViewCondition
static class
ModelViewEntity.ViewConditionExpr
static class
ModelViewEntity.ViewConditionList
static class
ModelViewEntity.ViewEntityCondition
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<ModelViewEntity.ModelAliasAll>
aliasAlls
List of alias-alls which act as a shortcut for easily pulling over member entity fieldsprotected ModelEntity
aliasedModelEntity
protected java.util.List<ModelViewEntity.ModelAlias>
aliases
List of aliases with information in addition to what is in the standard field listprotected java.util.List<ModelViewEntity.ModelMemberEntity>
allModelMemberEntities
A list of all ModelMemberEntity entries; this is mainly used to preserve the original order of member entities from the XML fileprotected java.util.Map<java.lang.String,ModelViewEntity.ModelConversion[]>
conversions
protected java.util.List<java.lang.String>
groupByFields
List of field names to group byprotected java.util.List<ModelField>
groupBys
A List of the Field objects for the View Entity, one for each GROUP BY fieldprotected java.util.Map<java.lang.String,java.lang.String>
memberModelEntities
Contains member-entity ModelEntities: key is alias, value is ModelEntity; populated with fieldsprotected java.util.Map<java.lang.String,ModelViewEntity.ModelMemberEntity>
memberModelMemberEntities
Contains member-entity alias name definitions: key is alias, value is ModelMemberEntitystatic java.lang.String
module
protected ModelViewEntity.ViewEntityCondition
viewEntityCondition
protected java.util.List<ModelViewEntity.ModelViewLink>
viewLinks
List of view links to define how entities are connected (or "joined")-
Fields inherited from class org.apache.ofbiz.entity.model.ModelEntity
autoClearCache, CREATE_STAMP_FIELD, CREATE_STAMP_TX_FIELD, dependentOn, doLock, entityName, location, neverCache, neverCheck, noAutoStamp, packageName, relations, sequenceBankSize, specializationOfModelEntity, specializedEntities, STAMP_FIELD, STAMP_TX_FIELD, tableName
-
-
Constructor Summary
Constructors Constructor Description ModelViewEntity(DynamicViewEntity dynamicViewEntity, ModelReader modelReader)
ModelViewEntity(ModelReader reader, org.w3c.dom.Element entityElement, UtilTimer utilTimer, ModelInfo def)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMemberModelMemberEntity(ModelViewEntity.ModelMemberEntity modelMemberEntity)
void
addViewLink(ModelViewEntity.ModelViewLink viewLink)
java.lang.StringBuilder
colNameString(java.lang.StringBuilder sb, java.lang.String prefix, java.lang.String separator, java.lang.String afterLast, boolean alias, ModelField... flds)
java.lang.String
colNameString(java.lang.String separator, java.lang.String afterLast, boolean alias, ModelField... flds)
Deprecated.java.lang.StringBuilder
colNameString(java.util.List<ModelField> flds, java.lang.StringBuilder sb, java.lang.String prefix, java.lang.String separator, java.lang.String afterLast, boolean alias)
java.lang.String
colNameString(java.util.List<ModelField> flds, java.lang.String separator, java.lang.String afterLast, boolean alias)
Deprecated.java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
convert(java.lang.String fromEntityName, java.util.Map<java.lang.String,? extends java.lang.Object> data)
ModelViewEntity.ModelAlias
getAlias(int index)
List of aliases with information in addition to what is in the standard field listModelViewEntity.ModelAlias
getAlias(java.lang.String name)
ModelEntity
getAliasedEntity(java.lang.String entityAlias, ModelReader modelReader)
ModelField
getAliasedField(ModelEntity aliasedEntity, java.lang.String field, ModelReader modelReader)
ModelEntity
getAliasedModelEntity()
java.util.List<ModelViewEntity.ModelAlias>
getAliasesCopy()
java.util.Iterator<ModelViewEntity.ModelAlias>
getAliasesIterator()
int
getAliasesSize()
java.util.List<ModelViewEntity.ModelMemberEntity>
getAllModelMemberEntities()
java.lang.String
getColNameOrAlias(java.lang.String fieldName)
The col-name of the Field, the alias of the field if this is on a view-entityjava.util.List<ModelField>
getGroupBysCopy()
java.util.List<ModelField>
getGroupBysCopy(java.util.List<ModelField> selectFields)
int
getGroupBysSize()
ModelEntity
getMemberModelEntity(java.lang.String alias)
java.util.Map<java.lang.String,ModelViewEntity.ModelMemberEntity>
getMemberModelMemberEntities()
ModelViewEntity.ModelMemberEntity
getMemberModelMemberEntity(java.lang.String alias)
protected ModelViewEntity.ModelConversion
getOrCreateModelConversion(java.lang.String aliasName)
ModelViewEntity.ModelViewLink
getViewLink(int index)
List of view links to define how entities are connected (or "joined")java.util.List<ModelViewEntity.ModelViewLink>
getViewLinksCopy()
java.util.Iterator<ModelViewEntity.ModelViewLink>
getViewLinksIterator()
int
getViewLinksSize()
void
populateFields(ModelReader modelReader)
void
populateFieldsBasic(ModelReader modelReader)
void
populateReverseLinks()
void
populateViewEntityConditionInformation(ModelFieldTypeReader modelFieldTypeReader, java.util.List<EntityCondition> whereConditions, java.util.List<EntityCondition> havingConditions, java.util.List<java.lang.String> orderByList, java.util.List<java.lang.String> entityAliasStack)
void
removeMemberModelMemberEntity(java.lang.String alias)
java.lang.String
toString()
-
Methods inherited from class org.apache.ofbiz.entity.model.ModelEntity
addExtendEntity, addField, addIndex, addRelation, addViewEntity, areFields, classNameString, classNameString, classNameString, classNameString, colNameString, colNameString, colNameString, colNameString, compareTo, containsAllPkFieldNames, convertFieldMapInPlace, convertFieldMapInPlace, convertFieldValue, convertFieldValue, convertFieldValue, convertFieldValue, convertToViewValues, createEoModelMap, fieldNameString, fieldNameString, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldsStringList, fieldTypeNameString, finderQueryString, finderQueryString, getAllFieldNames, getAuthor, getAutoClearCache, getAutomaticFieldNames, getCopyright, getDefaultResourceName, getDependentOn, getDescription, getDoLock, getEntityName, getField, getFieldsIterator, getFieldsSize, getFieldsUnmodifiable, getFirstPkFieldName, getHasFieldWithAuditLog, getIndex, getIndex, getIndexesIterator, getIndexesSize, getLocation, getModelReader, getNeverCache, getNeverCheck, getNoAutoStamp, getNoPkFieldNames, getNopksCopy, getNopksIterator, getNopksSize, getOnlyPk, getPackageName, getPkFieldNames, getPkFields, getPkFieldsUnmodifiable, getPksIterator, getPksSize, getPlainTableName, getRelation, getRelation, getRelationsIterator, getRelationsList, getRelationsManyList, getRelationsOneList, getRelationsOneSize, getRelationsSize, getSequenceBankSize, getTableName, getTableName, getTitle, getVersion, getViewConvertorsIterator, getViewEntitiesSize, httpArgList, httpArgList, httpArgListFromClass, httpArgListFromClass, httpArgListFromClass, httpArgListFromClass, httpRelationArgList, httpRelationArgList, isField, lock, nameString, nameString, nonPkNullList, pkNameString, pkNameString, populateBasicInfo, populateIndexes, populateRelated, primKeyClassNameString, removeField, removeIndex, removeRelation, removeViewEntity, removeViewEntity, setAutoClearCache, setDependentOn, setDoLock, setEntityName, setLocation, setNeverCache, setNeverCheck, setNoAutoStamp, setPackageName, setTableName, toGroupXmlElement, toGroupXmlElement, toXmlElement, toXmlElement, typeNameString, typeNameString, typeNameStringRelatedAndMain, typeNameStringRelatedAndMain, typeNameStringRelatedNoMapped, typeNameStringRelatedNoMapped, writeEoModelText
-
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
memberModelMemberEntities
protected java.util.Map<java.lang.String,ModelViewEntity.ModelMemberEntity> memberModelMemberEntities
Contains member-entity alias name definitions: key is alias, value is ModelMemberEntity
-
allModelMemberEntities
protected java.util.List<ModelViewEntity.ModelMemberEntity> allModelMemberEntities
A list of all ModelMemberEntity entries; this is mainly used to preserve the original order of member entities from the XML file
-
memberModelEntities
protected java.util.Map<java.lang.String,java.lang.String> memberModelEntities
Contains member-entity ModelEntities: key is alias, value is ModelEntity; populated with fields
-
aliasAlls
protected java.util.List<ModelViewEntity.ModelAliasAll> aliasAlls
List of alias-alls which act as a shortcut for easily pulling over member entity fields
-
aliases
protected java.util.List<ModelViewEntity.ModelAlias> aliases
List of aliases with information in addition to what is in the standard field list
-
viewLinks
protected java.util.List<ModelViewEntity.ModelViewLink> viewLinks
List of view links to define how entities are connected (or "joined")
-
groupBys
protected java.util.List<ModelField> groupBys
A List of the Field objects for the View Entity, one for each GROUP BY field
-
groupByFields
protected java.util.List<java.lang.String> groupByFields
List of field names to group by
-
conversions
protected java.util.Map<java.lang.String,ModelViewEntity.ModelConversion[]> conversions
-
viewEntityCondition
protected ModelViewEntity.ViewEntityCondition viewEntityCondition
-
aliasedModelEntity
protected ModelEntity aliasedModelEntity
-
-
Constructor Detail
-
ModelViewEntity
public ModelViewEntity(ModelReader reader, org.w3c.dom.Element entityElement, UtilTimer utilTimer, ModelInfo def)
-
ModelViewEntity
public ModelViewEntity(DynamicViewEntity dynamicViewEntity, ModelReader modelReader)
-
-
Method Detail
-
getMemberModelMemberEntities
public java.util.Map<java.lang.String,ModelViewEntity.ModelMemberEntity> getMemberModelMemberEntities()
-
getAllModelMemberEntities
public java.util.List<ModelViewEntity.ModelMemberEntity> getAllModelMemberEntities()
-
getMemberModelMemberEntity
public ModelViewEntity.ModelMemberEntity getMemberModelMemberEntity(java.lang.String alias)
-
getMemberModelEntity
public ModelEntity getMemberModelEntity(java.lang.String alias)
-
addMemberModelMemberEntity
public void addMemberModelMemberEntity(ModelViewEntity.ModelMemberEntity modelMemberEntity)
-
removeMemberModelMemberEntity
public void removeMemberModelMemberEntity(java.lang.String alias)
-
getColNameOrAlias
public java.lang.String getColNameOrAlias(java.lang.String fieldName)
The col-name of the Field, the alias of the field if this is on a view-entity- Overrides:
getColNameOrAlias
in classModelEntity
-
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(java.lang.String name)
-
getAliasesSize
public int getAliasesSize()
-
getAliasesIterator
public java.util.Iterator<ModelViewEntity.ModelAlias> getAliasesIterator()
-
getAliasesCopy
public java.util.List<ModelViewEntity.ModelAlias> getAliasesCopy()
-
getGroupBysSize
public int getGroupBysSize()
-
getGroupBysCopy
public java.util.List<ModelField> getGroupBysCopy()
-
getGroupBysCopy
public java.util.List<ModelField> getGroupBysCopy(java.util.List<ModelField> selectFields)
-
getViewLink
public ModelViewEntity.ModelViewLink getViewLink(int index)
List of view links to define how entities are connected (or "joined")
-
getViewLinksSize
public int getViewLinksSize()
-
getViewLinksIterator
public java.util.Iterator<ModelViewEntity.ModelViewLink> getViewLinksIterator()
-
getViewLinksCopy
public java.util.List<ModelViewEntity.ModelViewLink> getViewLinksCopy()
-
addViewLink
public void addViewLink(ModelViewEntity.ModelViewLink viewLink)
-
populateViewEntityConditionInformation
public void populateViewEntityConditionInformation(ModelFieldTypeReader modelFieldTypeReader, java.util.List<EntityCondition> whereConditions, java.util.List<EntityCondition> havingConditions, java.util.List<java.lang.String> orderByList, java.util.List<java.lang.String> entityAliasStack)
-
colNameString
@Deprecated public java.lang.String colNameString(java.lang.String separator, java.lang.String afterLast, boolean alias, ModelField... flds)
Deprecated.- Overrides:
colNameString
in classModelEntity
-
colNameString
public java.lang.StringBuilder colNameString(java.lang.StringBuilder sb, java.lang.String prefix, java.lang.String separator, java.lang.String afterLast, boolean alias, ModelField... flds)
- Overrides:
colNameString
in classModelEntity
-
colNameString
@Deprecated public java.lang.String colNameString(java.util.List<ModelField> flds, java.lang.String separator, java.lang.String afterLast, boolean alias)
Deprecated.- Overrides:
colNameString
in classModelEntity
-
colNameString
public java.lang.StringBuilder colNameString(java.util.List<ModelField> flds, java.lang.StringBuilder sb, java.lang.String prefix, java.lang.String separator, java.lang.String afterLast, boolean alias)
- Overrides:
colNameString
in classModelEntity
-
getAliasedModelEntity
public ModelEntity getAliasedModelEntity()
-
getAliasedEntity
public ModelEntity getAliasedEntity(java.lang.String entityAlias, ModelReader modelReader)
-
getAliasedField
public ModelField getAliasedField(ModelEntity aliasedEntity, java.lang.String field, ModelReader modelReader)
-
populateFields
public void populateFields(ModelReader modelReader)
-
populateFieldsBasic
public void populateFieldsBasic(ModelReader modelReader)
-
getOrCreateModelConversion
protected ModelViewEntity.ModelConversion getOrCreateModelConversion(java.lang.String aliasName)
-
populateReverseLinks
public void populateReverseLinks()
-
convert
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> convert(java.lang.String fromEntityName, java.util.Map<java.lang.String,? extends java.lang.Object> data)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classModelEntity
-
-