Class DynamicViewEntity


  • public class DynamicViewEntity
    extends java.lang.Object
    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.
    • Field Detail

      • module

        public static final java.lang.String module
      • entityName

        protected java.lang.String entityName
        The entity-name of the Entity
      • packageName

        protected java.lang.String packageName
        The package-name of the Entity
      • defaultResourceName

        protected java.lang.String defaultResourceName
        The default-resource-name of the Entity, used with the getResource call to check for a value in a resource bundle
      • title

        protected java.lang.String title
        The title for documentation purposes
      • memberModelMemberEntities

        protected java.util.Map<java.lang.String,​ModelViewEntity.ModelMemberEntity> memberModelMemberEntities
        Contains member-entity alias name definitions: key is alias, value is ModelMemberEntity
      • 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
      • groupBy

        protected java.util.List<java.lang.String> groupBy
        List of fields to group by
      • viewLinks

        protected java.util.List<ModelViewEntity.ModelViewLink> viewLinks
        List of view links to define how entities are connected (or "joined")
      • relations

        protected java.util.List<ModelRelation> relations
        relations defining relationships between this entity and other entities
    • Constructor Detail

      • DynamicViewEntity

        public DynamicViewEntity()
    • Method Detail

      • getViewXml

        public java.lang.String getViewXml​(java.lang.String entityName)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getViewElement

        public org.w3c.dom.Element getViewElement​(org.w3c.dom.Document doc,
                                                  java.lang.String entityName)
      • getOneRealEntityName

        public java.lang.String getOneRealEntityName()
      • getEntityName

        public java.lang.String getEntityName()
        Getter for property entityName.
        Returns:
        Value of property entityName.
      • setEntityName

        public void setEntityName​(java.lang.String entityName)
        Setter for property entityName.
        Parameters:
        entityName - New value of property entityName.
      • getPackageName

        public java.lang.String getPackageName()
        Getter for property packageName.
        Returns:
        Value of property packageName.
      • setPackageName

        public void setPackageName​(java.lang.String packageName)
        Setter for property packageName.
        Parameters:
        packageName - New value of property packageName.
      • getDefaultResourceName

        public java.lang.String getDefaultResourceName()
        Getter for property defaultResourceName.
        Returns:
        Value of property defaultResourceName.
      • setDefaultResourceName

        public void setDefaultResourceName​(java.lang.String defaultResourceName)
        Setter for property defaultResourceName.
        Parameters:
        defaultResourceName - New value of property defaultResourceName.
      • getTitle

        public java.lang.String getTitle()
        Getter for property title.
        Returns:
        Value of property title.
      • setTitle

        public void setTitle​(java.lang.String title)
        Setter for property title.
        Parameters:
        title - New value of property title.
      • addMemberEntity

        public void addMemberEntity​(java.lang.String entityAlias,
                                    java.lang.String entityName)
      • getModelMemberEntitiesEntryIter

        public java.util.Iterator<java.util.Map.Entry<java.lang.String,​ModelViewEntity.ModelMemberEntity>> getModelMemberEntitiesEntryIter()
      • addAliasAll

        public void addAliasAll​(java.lang.String entityAlias,
                                java.lang.String prefix,
                                java.util.Collection<java.lang.String> excludes)
      • addAlias

        public void addAlias​(java.lang.String entityAlias,
                             java.lang.String name)
      • addAlias

        public void addAlias​(java.lang.String entityAlias,
                             java.lang.String name,
                             java.lang.String field,
                             java.lang.String colAlias,
                             java.lang.Boolean primKey,
                             java.lang.Boolean groupBy,
                             java.lang.String function)
        Add an alias, full detail. All parameters can be null except entityAlias and name.
      • addAlias

        public void addAlias​(java.lang.String entityAlias,
                             java.lang.String name,
                             java.lang.String field,
                             java.lang.String colAlias,
                             java.lang.Boolean primKey,
                             java.lang.Boolean groupBy,
                             java.lang.String function,
                             ModelViewEntity.ComplexAliasMember complexAliasMember)
      • addAlias

        public void addAlias​(java.lang.String entityAlias,
                             java.lang.String name,
                             java.lang.String field,
                             java.lang.String colAlias,
                             java.lang.Boolean primKey,
                             java.lang.Boolean groupBy,
                             java.lang.String function,
                             java.lang.String fieldSet,
                             ModelViewEntity.ComplexAliasMember complexAliasMember)
      • addViewLink

        public void addViewLink​(java.lang.String entityAlias,
                                java.lang.String relEntityAlias,
                                java.lang.Boolean relOptional,
                                java.util.List<ModelKeyMap> modelKeyMaps)
      • addRelation

        public void addRelation​(java.lang.String type,
                                java.lang.String title,
                                java.lang.String relEntityName,
                                java.util.List<ModelKeyMap> modelKeyMaps)
      • addAllRelationsToList

        public void addAllRelationsToList​(java.util.List<ModelRelation> addList)
      • setGroupBy

        public void setGroupBy​(java.util.List<java.lang.String> groupBy)
      • addAllGroupByFieldsToList

        public void addAllGroupByFieldsToList​(java.util.List<java.lang.String> addList)