Class FetchTableRecordDBMethodGenerator

All Implemented Interfaces:
MethodGenerator

public class FetchTableRecordDBMethodGenerator extends DBMethodGenerator<VirtualTableRecordField>
Generator that creates methods for fetching existing table records by primary key. Used in store-based upserts to retrieve current DB state before mutating data.
  • Field Details

  • Constructor Details

  • Method Details

    • generate

      public no.sikt.graphitron.javapoet.MethodSpec generate(VirtualTableRecordField target)
      Specified by:
      generate in class AbstractSchemaMethodGenerator<VirtualTableRecordField,ObjectDefinition>
      Parameters:
      target - A VirtualTableRecordField identifying the table to fetch records from.
      Returns:
      A method that fetches records from the target table matching the primary keys of the input records.
    • getMethodName

      public static String getMethodName(String recordClassName)
      Returns:
      The generated method name for fetching records of the given type, e.g. "fetchCustomerRecords".
    • generateAll

      public List<no.sikt.graphitron.javapoet.MethodSpec> generateAll()
      Returns:
      List of complete javapoet MethodSpec that can be generated for this object.