Interface ObjectGraph

  • All Known Implementing Classes:
    EmptyObjectGraph, ObjectGraphImpl

    public interface ObjectGraph
    Read-only graph containing representations of an entity class that should be processed in entity-filtering. The representations are twofolds: simple (primitive/non-filterable) fields and further-filterable fields (represented by subgraphs).

    Object graph instances are created for entity-filtering scopes that are obtained from entity annotations, configuration or scopes defined on resource methods / classes (on server).

    See Also:
    ObjectGraphTransformer, ScopeResolver
    • Method Summary

      All Methods Instance Methods Abstract 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.
      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.
    • Method Detail

      • getEntityClass

        java.lang.Class<?> getEntityClass()
        Get entity domain class of this graph.
        Returns:
        entity domain class.
      • getFields

        java.util.Set<java.lang.String> getFields()
        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.
        Returns:
        non-filterable fields.
      • getFields

        java.util.Set<java.lang.String> getFields​(java.lang.String parent)
        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.
        Parameters:
        parent - name of parent field.
        Returns:
        non-filterable fields.
      • getSubgraphs

        java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs()
        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.
        Returns:
        further-filterable map of fields.
      • getSubgraphs

        java.util.Map<java.lang.String,​ObjectGraph> getSubgraphs​(java.lang.String parent)
        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.
        Parameters:
        parent - name of parent field.
        Returns:
        further-filterable map of fields.