Class SimpleProjectionMetadataRegistry

java.lang.Object
nl.datasteel.crudcraft.projection.mapping.SimpleProjectionMetadataRegistry
All Implemented Interfaces:
ProjectionMetadataRegistry

public class SimpleProjectionMetadataRegistry extends Object implements ProjectionMetadataRegistry
Simple in-memory registry for projection metadata. In a real application the entries would be generated at compile time.
  • Constructor Details

    • SimpleProjectionMetadataRegistry

      public SimpleProjectionMetadataRegistry()
  • Method Details

    • register

      public <D> void register(ProjectionMetadata<D> projectionMetadata)
      Registers new projection metadata.
      Parameters:
      projectionMetadata - the metadata to register
    • getMetadata

      public <D> ProjectionMetadata<D> getMetadata(Class<D> dtoType)
      Retrieves the metadata for a given DTO type.
      Specified by:
      getMetadata in interface ProjectionMetadataRegistry
      Type Parameters:
      D - the type of the DTO
      Parameters:
      dtoType - the class type of the DTO
      Returns:
      the projection metadata for the specified DTO type, or null if not found