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:
Serializable
,Comparable<ModelEntity>
This class extends ModelEntity and provides additional information appropriate to view entities
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static interface
static final class
static final class
final class
static final class
static final class
static interface
static final class
static final class
static final class
-
Field Summary
Fields inherited from class org.apache.ofbiz.entity.model.ModelEntity
CREATE_STAMP_FIELD, CREATE_STAMP_TX_FIELD, STAMP_FIELD, STAMP_TX_FIELD
-
Constructor Summary
ConstructorDescriptionModelViewEntity
(DynamicViewEntity dynamicViewEntity, ModelReader modelReader) ModelViewEntity
(ModelReader reader, Element entityElement, UtilTimer utilTimer, ModelInfo def) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberModelMemberEntity
(ModelViewEntity.ModelMemberEntity modelMemberEntity) Add member model member entity.void
addViewLink
(ModelViewEntity.ModelViewLink viewLink) Add view link.colNameString
(StringBuilder sb, String prefix, String separator, String afterLast, boolean alias, ModelField... flds) Col name string string builder.colNameString
(String separator, String afterLast, boolean alias, ModelField... flds) Deprecated.colNameString
(List<ModelField> flds, StringBuilder sb, String prefix, String separator, String afterLast, boolean alias) Col name string string builder.colNameString
(List<ModelField> flds, String separator, String afterLast, boolean alias) Deprecated.Convert list.getAlias
(int index) List of aliases with information in addition to what is in the standard field listGets alias.getAliasedEntity
(String entityAlias, ModelReader modelReader) Gets aliased entity.getAliasedField
(ModelEntity aliasedEntity, String field, ModelReader modelReader) Gets aliased field.Gets aliased model entity.Gets aliases copy.Gets aliases iterator.int
Gets aliases size.Gets all model member entities.getColNameOrAlias
(String fieldName) The col-name of the Field, the alias of the field if this is on a view-entityGets group bys copy.getGroupBysCopy
(List<ModelField> selectFields) Gets group bys copy.int
Gets group bys size.getMemberModelEntity
(String alias) Gets member model entity.Gets member model member entities.getMemberModelMemberEntity
(String alias) Gets member model member entity.protected ModelViewEntity.ModelConversion
getOrCreateModelConversion
(String aliasName) Gets or create model conversion.getViewLink
(int index) List of view links to define how entities are connected (or "joined")Gets view links copy.Gets view links iterator.int
Gets view links size.void
populateFields
(ModelReader modelReader) Populate fields.void
populateFieldsBasic
(ModelReader modelReader) Populate fields basic.void
Populate reverse links.void
populateViewEntityConditionInformation
(ModelFieldTypeReader modelFieldTypeReader, List<EntityCondition> whereConditions, List<EntityCondition> havingConditions, List<String> orderByList, List<String> entityAliasStack) Populate view entity condition information.void
Remove member model member entity.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, getRelations, 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, toXmlElement, typeNameString, typeNameString, typeNameStringRelatedAndMain, typeNameStringRelatedAndMain, typeNameStringRelatedNoMapped, typeNameStringRelatedNoMapped, writeEoModelText
-
Constructor Details
-
ModelViewEntity
public ModelViewEntity(ModelReader reader, Element entityElement, UtilTimer utilTimer, ModelInfo def) -
ModelViewEntity
-
-
Method Details
-
getMemberModelMemberEntities
Gets member model member entities.- Returns:
- the member model member entities
-
getAllModelMemberEntities
Gets all model member entities.- Returns:
- the all model member entities
-
getMemberModelMemberEntity
Gets member model member entity.- Parameters:
alias
- the alias- Returns:
- the member model member entity
-
getMemberModelEntity
Gets member model entity.- Parameters:
alias
- the alias- Returns:
- the member model entity
-
addMemberModelMemberEntity
Add member model member entity.- Parameters:
modelMemberEntity
- the model member entity
-
removeMemberModelMemberEntity
Remove member model member entity.- Parameters:
alias
- the alias
-
getColNameOrAlias
The col-name of the Field, the alias of the field if this is on a view-entity- Overrides:
getColNameOrAlias
in classModelEntity
- Returns:
- the col name or alias
-
getAlias
List of aliases with information in addition to what is in the standard field list -
getAlias
Gets alias.- Parameters:
name
- the name- Returns:
- the alias
-
getAliasesSize
public int getAliasesSize()Gets aliases size.- Returns:
- the aliases size
-
getAliasesIterator
Gets aliases iterator.- Returns:
- the aliases iterator
-
getAliasesCopy
Gets aliases copy.- Returns:
- the aliases copy
-
getGroupBysSize
public int getGroupBysSize()Gets group bys size.- Returns:
- the group bys size
-
getGroupBysCopy
Gets group bys copy.- Returns:
- the group bys copy
-
getGroupBysCopy
Gets group bys copy.- Parameters:
selectFields
- the select fields- Returns:
- the group bys copy
-
getViewLink
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
Gets view links iterator.- Returns:
- the view links iterator
-
getViewLinksCopy
Gets view links copy.- Returns:
- the view links copy
-
addViewLink
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 readerwhereConditions
- the where conditionshavingConditions
- the having conditionsorderByList
- the order by listentityAliasStack
- 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 classModelEntity
- Parameters:
separator
- the separatorafterLast
- the after lastalias
- the aliasflds
- 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 classModelEntity
- Parameters:
sb
- the sbprefix
- the prefixseparator
- the separatorafterLast
- the after lastalias
- the aliasflds
- 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 classModelEntity
- Parameters:
flds
- the fldsseparator
- the separatorafterLast
- the after lastalias
- 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 classModelEntity
- Parameters:
flds
- the fldssb
- the sbprefix
- the prefixseparator
- the separatorafterLast
- the after lastalias
- the alias- Returns:
- the string builder
-
getAliasedModelEntity
Gets aliased model entity.- Returns:
- the aliased model entity
-
getAliasedEntity
Gets aliased entity.- Parameters:
entityAlias
- the entity aliasmodelReader
- the model reader- Returns:
- the aliased entity
-
getAliasedField
Gets aliased field.- Parameters:
aliasedEntity
- the aliased entityfield
- the fieldmodelReader
- the model reader- Returns:
- the aliased field
-
populateFields
Populate fields.- Parameters:
modelReader
- the model reader
-
populateFieldsBasic
Populate fields basic.- Parameters:
modelReader
- the model reader
-
getOrCreateModelConversion
Gets or create model conversion.- Parameters:
aliasName
- the alias name- Returns:
- the or create model conversion
-
populateReverseLinks
public void populateReverseLinks()Populate reverse links. -
convert
Convert list.- Parameters:
fromEntityName
- the from entity namedata
- the data- Returns:
- the list
-
toString
- Overrides:
toString
in classModelEntity
-