Class NodeIdReferenceHelpers

java.lang.Object
no.sikt.graphitron.generators.context.NodeIdReferenceHelpers

public class NodeIdReferenceHelpers extends Object
  • Constructor Details

    • NodeIdReferenceHelpers

      public NodeIdReferenceHelpers()
  • Method Details

    • getForeignKeyForNodeIdReference

      public static Optional<org.jooq.ForeignKey<?,?>> getForeignKeyForNodeIdReference(GenerationField target, ProcessedSchema schema)
    • getSourceFieldsForForeignKey

      public static no.sikt.graphitron.javapoet.CodeBlock getSourceFieldsForForeignKey(GenerationField target, ProcessedSchema schema, no.sikt.graphitron.javapoet.CodeBlock targetAlias)
    • getKeyFieldsForSourceNodeTable

      public static List<String> getKeyFieldsForSourceNodeTable(ObjectDefinition nodeType, GenerationField field, String tableName, ProcessedSchema schema)
      Parameters:
      nodeType - The nodeId's type
      field - The field with the nodeId directive
      tableName - The target jOOQ table name.
      Returns:
      Returns the fields that corresponds to the nodeId key columns. For references it returns the source fields.