Class ObjectGraphImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectGraphImpl​(java.util.Map<java.lang.Class<?>,​EntityGraph> classToGraph, EntityGraph graph, java.util.Set<java.lang.String> filteringScopes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getEntityClass()
      Get entity domain class of this graph.
      java.util.Set<java.lang.String> getFields()
      Get a set of all simple (non-filterable) fields of entity class.
      java.util.Set<java.lang.String> getFields​(java.lang.String parent)
      Get fields with the given parent path.
      private java.util.Set<java.lang.String> getFilteringScopes​(java.lang.String parent)  
      java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs()
      Get a map of all further-filterable fields of entity class.
      java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs​(java.lang.String parent)
      Get subgraphs with the given parent path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • filteringScopes

        private final java.util.Set<java.lang.String> filteringScopes
      • classToGraph

        private final java.util.Map<java.lang.Class<?>,​EntityGraph> classToGraph
      • fields

        private java.util.Set<java.lang.String> fields
      • subgraphs

        private java.util.Map<java.lang.String,​ObjectGraph> subgraphs
    • Constructor Detail

      • ObjectGraphImpl

        ObjectGraphImpl​(java.util.Map<java.lang.Class<?>,​EntityGraph> classToGraph,
                        EntityGraph graph,
                        java.util.Set<java.lang.String> filteringScopes)
    • Method Detail

      • getEntityClass

        public java.lang.Class<?> getEntityClass()
        Description copied from interface: ObjectGraph
        Get entity domain class of this graph.
        Specified by:
        getEntityClass in interface ObjectGraph
        Returns:
        entity domain class.
      • getFields

        public java.util.Set<java.lang.String> getFields()
        Description copied from interface: ObjectGraph
        Get a set of all simple (non-filterable) fields of entity class. Value of each of these fields is either primitive or the entity-filtering feature cannot be applied to this field. Values of these fields can be directly processed.
        Specified by:
        getFields in interface ObjectGraph
        Returns:
        non-filterable fields.
      • getFields

        public java.util.Set<java.lang.String> getFields​(java.lang.String parent)
        Description copied from interface: ObjectGraph
        Get fields with the given parent path. The parent path, which may exist in the requested filtering scopes, is used for context to match against the field at the subgraph level.
        Specified by:
        getFields in interface ObjectGraph
        Parameters:
        parent - name of parent field.
        Returns:
        non-filterable fields.
      • getSubgraphs

        public java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs()
        Description copied from interface: ObjectGraph
        Get a map of all further-filterable fields of entity class. Mappings are represented as:
         <field> -> <object-graph>
        It is supposed that object graphs contained in this map would be processed further.
        Specified by:
        getSubgraphs in interface ObjectGraph
        Returns:
        further-filterable map of fields.
      • getSubgraphs

        public java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs​(java.lang.String parent)
        Description copied from interface: ObjectGraph
        Get subgraphs with the given parent path. The parent path, which may exist in the requested filtering scopes, is used for context to match against the subgraph level.
        Specified by:
        getSubgraphs in interface ObjectGraph
        Parameters:
        parent - name of parent field.
        Returns:
        further-filterable map of fields.
      • getFilteringScopes

        private java.util.Set<java.lang.String> getFilteringScopes​(java.lang.String parent)