Package org.apache.ofbiz.entity.model
Class DynamicViewEntity
java.lang.Object
org.apache.ofbiz.entity.model.DynamicViewEntity
This class is used for declaring Dynamic View Entities, to be used and thrown away.
A special method exists on the Delegator to accept a DynamicViewEntity instead
of an entity-name.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add alias.void
addAlias
(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function) Add an alias, full detail.void
addAlias
(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function, String fieldSet, ModelViewEntity.ComplexAliasMember complexAliasMember) Add alias.void
addAlias
(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function, ModelViewEntity.ComplexAliasMember complexAliasMember) Add alias.void
addAliasAll
(String entityAlias, String prefix) Deprecated.void
addAliasAll
(String entityAlias, String prefix, Collection<String> excludes) Add alias all.void
Add all alias alls to list.void
Add all aliases to list.void
addAllGroupByFieldsToList
(List<String> addList) Add all group by fields to list.void
addAllRelationsToList
(List<ModelRelation> addList) Add all relations to list.void
Add all view links to list.void
addMemberEntity
(String entityAlias, String entityName) Add member entity.void
addRelation
(String type, String title, String relEntityName, List<ModelKeyMap> modelKeyMaps) Add relation.void
addViewLink
(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> modelKeyMaps) Add view link.void
addViewLink
(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> modelKeyMaps, ModelViewEntity.ViewEntityCondition viewCond) Add view link.void
addViewLink
(String entityAlias, String relEntityAlias, Boolean relOptional, ModelViewEntity.ViewEntityCondition viewCond) Add view link.Getter for property defaultResourceName.Getter for property entityName.Gets model member entities entry iter.Gets one real entity name.Getter for property packageName.getTitle()
Getter for property title.getViewElement
(Document doc, String entityName) Gets view element.getViewXml
(String entityName) Gets view xml.makeModelViewEntity
(Delegator delegator) Make model view entity model view entity.makeViewEntityCondition
(Delegator delegator, String entityAlias, String fieldName, String operator, String value) Prepare a ViewEntityCondition to use in view linkmakeViewEntityCondition
(Delegator delegator, String entityAlias, String fieldName, String operator, String relEntityAlias, String relFieldName) Prepare a ViewEntityCondition to use in view linkmakeViewEntityCondition
(Delegator delegator, Element entityConditionElement) Prepare a ViewEntityCondition to use in view linkvoid
setDefaultResourceName
(String defaultResourceName) Setter for property defaultResourceName.void
setEntityName
(String entityName) Setter for property entityName.void
setGroupBy
(List<String> groupBy) Sets group by.void
setPackageName
(String packageName) Setter for property packageName.void
Setter for property title.
-
Constructor Details
-
DynamicViewEntity
public DynamicViewEntity()
-
-
Method Details
-
makeModelViewEntity
Make model view entity model view entity.- Parameters:
delegator
- the delegator- Returns:
- the model view entity
-
getViewXml
Gets view xml.- Parameters:
entityName
- the entity name- Returns:
- the view xml
- Throws:
IOException
- the io exception
-
getViewElement
Gets view element.- Parameters:
doc
- the docentityName
- the entity name- Returns:
- the view element
-
getOneRealEntityName
Gets one real entity name.- Returns:
- the one real entity name
-
getEntityName
Getter for property entityName.- Returns:
- Value of property entityName.
-
setEntityName
Setter for property entityName.- Parameters:
entityName
- New value of property entityName.
-
getPackageName
Getter for property packageName.- Returns:
- Value of property packageName.
-
setPackageName
Setter for property packageName.- Parameters:
packageName
- New value of property packageName.
-
getDefaultResourceName
Getter for property defaultResourceName.- Returns:
- Value of property defaultResourceName.
-
setDefaultResourceName
Setter for property defaultResourceName.- Parameters:
defaultResourceName
- New value of property defaultResourceName.
-
getTitle
Getter for property title.- Returns:
- Value of property title.
-
setTitle
Setter for property title.- Parameters:
title
- New value of property title.
-
addMemberEntity
Add member entity.- Parameters:
entityAlias
- the entity aliasentityName
- the entity name
-
getModelMemberEntitiesEntryIter
public Iterator<Map.Entry<String,ModelViewEntity.ModelMemberEntity>> getModelMemberEntitiesEntryIter()Gets model member entities entry iter.- Returns:
- the model member entities entry iter
-
addAliasAll
Deprecated. -
addAliasAll
Add alias all.- Parameters:
entityAlias
- the entity aliasprefix
- the prefixexcludes
- the excludes
-
addAllAliasAllsToList
Add all alias alls to list.- Parameters:
addList
- the add list
-
addAlias
Add alias.- Parameters:
entityAlias
- the entity aliasname
- the name
-
addAlias
public void addAlias(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function) Add an alias, full detail. All parameters can be null except entityAlias and name. -
addAlias
public void addAlias(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function, ModelViewEntity.ComplexAliasMember complexAliasMember) Add alias.- Parameters:
entityAlias
- the entity aliasname
- the namefield
- the fieldcolAlias
- the col aliasprimKey
- the prim keygroupBy
- the group byfunction
- the functioncomplexAliasMember
- the complex alias member
-
addAlias
public void addAlias(String entityAlias, String name, String field, String colAlias, Boolean primKey, Boolean groupBy, String function, String fieldSet, ModelViewEntity.ComplexAliasMember complexAliasMember) Add alias.- Parameters:
entityAlias
- the entity aliasname
- the namefield
- the fieldcolAlias
- the col aliasprimKey
- the prim keygroupBy
- the group byfunction
- the functionfieldSet
- the field setcomplexAliasMember
- the complex alias member
-
addAllAliasesToList
Add all aliases to list.- Parameters:
addList
- the add list
-
addViewLink
public void addViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> modelKeyMaps) Add view link.- Parameters:
entityAlias
- the entity aliasrelEntityAlias
- the rel entity aliasrelOptional
- the rel optionalmodelKeyMaps
- the model key maps
-
addViewLink
public void addViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, ModelViewEntity.ViewEntityCondition viewCond) Add view link.- Parameters:
entityAlias
- the entity aliasrelEntityAlias
- the rel entity aliasrelOptional
- the rel optionalviewCond
- the condition of the view link
-
addViewLink
public void addViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> modelKeyMaps, ModelViewEntity.ViewEntityCondition viewCond) Add view link.- Parameters:
entityAlias
- the entity aliasrelEntityAlias
- the rel entity aliasrelOptional
- the rel optionalmodelKeyMaps
- the model key mapsviewCond
- the condition of the view link
-
makeViewEntityCondition
public ModelViewEntity.ViewEntityCondition makeViewEntityCondition(Delegator delegator, String entityAlias, String fieldName, String operator, String value) Prepare a ViewEntityCondition to use in view link- Parameters:
delegator
-entityAlias
-fieldName
-operator
-value
-- Returns:
-
makeViewEntityCondition
public ModelViewEntity.ViewEntityCondition makeViewEntityCondition(Delegator delegator, String entityAlias, String fieldName, String operator, String relEntityAlias, String relFieldName) Prepare a ViewEntityCondition to use in view link- Parameters:
delegator
-entityAlias
-fieldName
-operator
-relEntityAlias
-relFieldName
-- Returns:
-
makeViewEntityCondition
public ModelViewEntity.ViewEntityCondition makeViewEntityCondition(Delegator delegator, Element entityConditionElement) Prepare a ViewEntityCondition to use in view link- Parameters:
delegator
-entityConditionElement
-- Returns:
-
addAllViewLinksToList
Add all view links to list.- Parameters:
addList
- the add list
-
addRelation
public void addRelation(String type, String title, String relEntityName, List<ModelKeyMap> modelKeyMaps) Add relation.- Parameters:
type
- the typetitle
- the titlerelEntityName
- the rel entity namemodelKeyMaps
- the model key maps
-
addAllRelationsToList
Add all relations to list.- Parameters:
addList
- the add list
-
setGroupBy
Sets group by.- Parameters:
groupBy
- the group by
-
addAllGroupByFieldsToList
Add all group by fields to list.- Parameters:
addList
- the add list
-
addAliasAll(String, String, Collection)