Package no.sikt.graphitron.configuration
Class GeneratorConfig
java.lang.Object
no.sikt.graphitron.configuration.GeneratorConfig
Static generator configuration. Mostly dependent on the settings set through the POM XML.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic voidclear()Clear all configurations.static Stringstatic Stringstatic CodeGenerationThresholdsstatic ExternalReferencesstatic Stringstatic List<GlobalTransform>static intstatic RecordValidationstatic voidloadProperties(Generator mojo) Read all the configurations set in the XML from the provided MOJO.static Stringstatic Stringstatic booleanstatic voidsetAlwaysUsePrimaryKeyInSplitQueries(boolean usePrimaryKey) static voidsetCodeGenerationThresholds(CodeGenerationThresholds thresholds) static voidsetGeneratorSchemaFiles(String... files) static voidsetGeneratorSchemaFiles(Set<String> files) static voidsetNodeStrategy(boolean shouldUseNodeStrategy) static voidsetOutputDirectory(String path) static voidsetProperties(Set<String> files, String outputDir, String outputPkg, String jooqPkg, List<ExternalReference> references, Set<String> imports, List<GlobalTransform> globalTransforms) Set the generator properties from code.static voidsetRecordValidation(RecordValidation recordValidation) static voidsetUserSchemaFiles(Set<String> files) static booleanstatic boolean
-
Constructor Details
-
GeneratorConfig
public GeneratorConfig()
-
-
Method Details
-
setProperties
public static void setProperties(Set<String> files, String outputDir, String outputPkg, String jooqPkg, List<ExternalReference> references, Set<String> imports, List<GlobalTransform> globalTransforms) Set the generator properties from code. Intended for tests. -
loadProperties
Read all the configurations set in the XML from the provided MOJO. -
clear
public static void clear()Clear all configurations. Intended for tests. -
generatorSchemaFiles
-
schemaFiles
-
outputDirectory
-
outputPackage
-
generatedResolversPackage
-
generatedModelsPackage
-
getGeneratedJooqPackage
-
getExternalReferences
-
getExternalReferenceImports
-
getGlobalTransforms
-
getRecordValidation
-
recordValidationEnabled
public static boolean recordValidationEnabled() -
shouldMakeNodeStrategy
public static boolean shouldMakeNodeStrategy() -
setNodeStrategy
public static void setNodeStrategy(boolean shouldUseNodeStrategy) -
alwaysUsePrimaryKeyInSplitQueries
public static boolean alwaysUsePrimaryKeyInSplitQueries() -
setAlwaysUsePrimaryKeyInSplitQueries
public static void setAlwaysUsePrimaryKeyInSplitQueries(boolean usePrimaryKey) -
setRecordValidation
-
setGeneratorSchemaFiles
-
setGeneratorSchemaFiles
-
setUserSchemaFiles
-
setOutputDirectory
-
getMaxAllowedPageSize
public static int getMaxAllowedPageSize() -
useOptionalSelects
public static boolean useOptionalSelects() -
getCodeGenerationThresholds
-
setCodeGenerationThresholds
-