Class SearchFieldCollector

java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.SearchFieldCollector

public class SearchFieldCollector extends Object
Collects searchable fields from a model descriptor and its child models up to a specified depth, creating a list of SearchField objects. This is used to generate search functionality for CrudCraft entities.
  • Constructor Details

    • SearchFieldCollector

      public SearchFieldCollector(WriteContext ctx)
      Constructs a SearchFieldCollector with the given WriteContext.
      Parameters:
      ctx - the WriteContext containing environment and utilities for writing
  • Method Details

    • collect

      public List<SearchField> collect(ModelDescriptor root, int depth)
      Collects searchable fields from the given model descriptor and its children up to the specified depth.
      Parameters:
      root - the root model descriptor to start collecting from
      depth - the maximum depth to traverse child models
      Returns:
      a list of SearchField objects representing searchable fields