java.lang.Object
org.tentackle.model.print.PrintConfiguration
Holds parameters to configure the generated output.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionPrintConfiguration(boolean printingAsComment, boolean usingVariables, ModelDefaults modelDefaults, List<String> optionAnnotations, int columnGap) Creates a printing configuration. -
Method Summary
Modifier and TypeMethodDescriptionintGets the minimum number of spaces between columns in attribute section.Gets the model defaults.Gets the annotations that should be printed as attribute options.booleanisOptionAnnotation(String annotation) Returns whether given annotation should be printed as an attribute option.booleanReturns whether generated output is a comment block.booleanReturns whether variables should be used.
-
Constructor Details
-
PrintConfiguration
public PrintConfiguration(boolean printingAsComment, boolean usingVariables, ModelDefaults modelDefaults, List<String> optionAnnotations, int columnGap) Creates a printing configuration.- Parameters:
printingAsComment- create a comment blockusingVariables- use variables for tablename, classid and mappingmodelDefaults- the model defaults, null if noneoptionAnnotations- annotations that should be printed as attribute optionscolumnGap- minimum number of spaces between columns in attribute section
-
-
Method Details
-
isPrintingAsComment
public boolean isPrintingAsComment()Returns whether generated output is a comment block.- Returns:
- true to print as comment, else normal output
-
isUsingVariables
public boolean isUsingVariables()Returns whether variables should be used.- Returns:
- true if tablename, classid and mapping are variables
-
getModelDefaults
Gets the model defaults.- Returns:
- the defaults, null if none
-
getOptionAnnotations
Gets the annotations that should be printed as attribute options.- Returns:
- the options, empty if none
-
getColumnGap
public int getColumnGap()Gets the minimum number of spaces between columns in attribute section.- Returns:
- the gap (always ≥ 1)
-
isOptionAnnotation
Returns whether given annotation should be printed as an attribute option.- Parameters:
annotation- the annotation string- Returns:
- true if attribute option
-