Class GenerateCodeJsonSchemaPersonalization

java.lang.Object
com.graphql_java_generator.plugin.schema_personalization.GenerateCodeJsonSchemaPersonalization

@Component public class GenerateCodeJsonSchemaPersonalization extends Object
This tool contains the logic which allows the plugin user to personnalize the code generation. It allows to:
  • Add specific fields. For instance, fields used for foreign keys
  • Add or replace entity annotation. For instance remove the JPA Entity annotation on a generated Entity. In wich can, the developper can inherit from the generated entity, and oerride everything
  • Add or replace field annotation. For instance to change the JPA behavior, specify a column name for a field...
Author:
etienne-sf
  • Constructor Details

    • GenerateCodeJsonSchemaPersonalization

      public GenerateCodeJsonSchemaPersonalization()
  • Method Details

    • applySchemaPersonalization

      public void applySchemaPersonalization()
      This is the 'main' method for this class: it loads the schema personalization from the json user file, and update what the GenerateCodeDocumentParser has already loaded according to the user's needs.
    • loadGraphQLSchemaPersonalization

      public com.graphql_java_generator.plugin.schema_personalization.SchemaPersonalization loadGraphQLSchemaPersonalization()
      Let's load the schema personalization from the configuration json file.
      Returns:
    • logParsingError

      public void logParsingError(String error)