Class NodeIdReferenceHelpers
java.lang.Object
no.sikt.graphitron.generators.context.NodeIdReferenceHelpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<org.jooq.ForeignKey<?, ?>> getForeignKeyForNodeIdReference(GenerationField target, ProcessedSchema schema) getKeyFieldsForSourceNodeTable(ObjectDefinition nodeType, GenerationField field, String tableName, ProcessedSchema schema) static no.sikt.graphitron.javapoet.CodeBlockgetSourceFieldsForForeignKey(GenerationField target, ProcessedSchema schema, no.sikt.graphitron.javapoet.CodeBlock targetAlias)
-
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 typefield- The field with the nodeId directivetableName- The target jOOQ table name.- Returns:
- Returns the fields that corresponds to the nodeId key columns. For references it returns the source fields.
-