Class GenerateServerCodeExtension

java.lang.Object
All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
Direct Known Subclasses:
GraphQLExtension

public class GenerateServerCodeExtension
extends GenerateCodeCommonExtension
implements com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
  • Field Details

    • javaTypeForIDType

      public java.lang.String javaTypeForIDType

      The javaTypeForIDType is the java class that is used in the generated code for GraphQL fields that are of the GraphQL ID type. The default value is java.util.UUID. Valid values are: java.lang.String, java.lang.Long and java.util.UUID.

      This parameter is only valid for the server mode. When generating the client code, the ID is always generated as a String type, as recommended in the GraphQL doc.

      In other words: when in server mode and javaTypeForIDType is not set, all GraphQL ID fields are UUID attributes in java. When in server mode and javaTypeForIDType is set to the X type, all GraphQL ID fields are X attributes in java.

      Note: you can override this, by using the schema personalization capability. For more information, please have a look at the Schema Personalization doc page.

  • Constructor Details

  • Method Details

    • isGenerateBatchLoaderEnvironment

      public boolean isGenerateBatchLoaderEnvironment()
      Specified by:
      isGenerateBatchLoaderEnvironment in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setGenerateBatchLoaderEnvironment

      public void setGenerateBatchLoaderEnvironment​(boolean generateBatchLoaderEnvironment)
    • isGenerateJPAAnnotation

      public boolean isGenerateJPAAnnotation()
      Specified by:
      isGenerateJPAAnnotation in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setGenerateJPAAnnotation

      public void setGenerateJPAAnnotation​(boolean generateJPAAnnotation)
    • isGenerateDataLoaderForLists

      public boolean isGenerateDataLoaderForLists()
      Specified by:
      isGenerateDataLoaderForLists in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setGenerateDataLoaderForLists

      public final void setGenerateDataLoaderForLists​(boolean generateDataLoaderForLists)
    • getJavaTypeForIDType

      public java.lang.String getJavaTypeForIDType()
      Specified by:
      getJavaTypeForIDType in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setJavaTypeForIDType

      public void setJavaTypeForIDType​(java.lang.String javaTypeForIDType)
    • getMode

      public com.graphql_java_generator.plugin.conf.PluginMode getMode()
      The mode is forced to PluginMode.server
      Specified by:
      getMode in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
      Overrides:
      getMode in class GenerateCodeCommonExtension
    • getPackaging

      public com.graphql_java_generator.plugin.conf.Packaging getPackaging()
      Specified by:
      getPackaging in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • getQuotedScanBasePackages

      public java.lang.String getQuotedScanBasePackages()
      Specified by:
      getQuotedScanBasePackages in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • getScanBasePackages

      public java.lang.String getScanBasePackages()
      Specified by:
      getScanBasePackages in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setScanBasePackages

      public void setScanBasePackages​(java.lang.String scanBasePackages)
    • getSchemaPersonalizationFile

      public java.io.File getSchemaPersonalizationFile()
      Specified by:
      getSchemaPersonalizationFile in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • setSchemaPersonalizationFile

      public void setSchemaPersonalizationFile​(java.lang.String schemaPersonalizationFile)