Class ObjectGraphBuilder

java.lang.Object
org.eclipse.persistence.jpa.rs.util.ObjectGraphBuilder

public class ObjectGraphBuilder extends Object
Builds object graph for JPARS 2.0. Object graph defines the structure of the returned data. It hides some fields which are not suppose to be returned to the client.
Author:
Dmitry Kornilov
  • Constructor Details

    • ObjectGraphBuilder

      public ObjectGraphBuilder(PersistenceContext context)
      Creates an object graph builder.
      Parameters:
      context - the persistence context
  • Method Details

    • createObjectGraph

      public ObjectGraph createObjectGraph(Object object, FieldsFilter filter)
      Builds object graph for specified object using given filter.
      Parameters:
      object - the object to build object graph for. Mandatory.
      filter - the filter (included or excluded fields) to use. Optional.
      Returns:
      constructed object graph.