Class ProjectionManager


  • public class ProjectionManager
    extends Object
    Handles projection creation through the ProjectionFactory, and is further responsible for registering type extensions with the TypeFactory, as well as registering any required deserializer modules with the Jackson ObjectMapper for appropriate deserialization to the projection upon entry into the service endpoint.
    Author:
    Jeff Fischer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> void processCandidate​(Class<T> repoEntityClass, Class<T> candidate)
      Given a class identified as managed by a Repository, and a candidate domain class (either the same, or possibly more derived type), process all projection creation, type factory registration, and ObjectMapper deserialization module registration.
      <T> void processProjection​(Class<T> repoEntityClass, String projectionName)
      Given a class identified as managed by a Repository, and a target simple name for a projection class based on the managed class, process all projection creation, type factory registration, and ObjectMapper deserialization module registration.
    • Constructor Detail

      • ProjectionManager

        public ProjectionManager​(TypeFactory typeFactory,
                                 ProjectionFactory projectionFactory,
                                 com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • processCandidate

        public <T> void processCandidate​(Class<T> repoEntityClass,
                                         Class<T> candidate)
        Given a class identified as managed by a Repository, and a candidate domain class (either the same, or possibly more derived type), process all projection creation, type factory registration, and ObjectMapper deserialization module registration.
        Type Parameters:
        T - The shared domain class type
        Parameters:
        repoEntityClass - A class identified as managed by a Repository
        candidate - Either the same as repoEntityClass, or possibly more derived type
      • processProjection

        public <T> void processProjection​(Class<T> repoEntityClass,
                                          String projectionName)
        Given a class identified as managed by a Repository, and a target simple name for a projection class based on the managed class, process all projection creation, type factory registration, and ObjectMapper deserialization module registration.
        Type Parameters:
        T - The shared domain class type
        Parameters:
        repoEntityClass - A class identified as managed by a Repository
        projectionName - The simple name of the target projection class