- java.lang.Object
-
- org.tentackle.model.print.PrintConfiguration
-
public class PrintConfiguration extends java.lang.ObjectHolds parameters to configure the generated output.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description PrintConfiguration(boolean printingAsComment, boolean usingVariables, ModelDefaults modelDefaults, java.util.List<java.lang.String> optionAnnotations, int columnGap)Creates a printing configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnGap()Gets the minimum number of spaces between columns in attribute section.ModelDefaultsgetModelDefaults()Gets the model defaults.java.util.List<java.lang.String>getOptionAnnotations()Gets the annotations that should be printed as attribute options.booleanisOptionAnnotation(java.lang.String annotation)Returns whether given annotation should be printed as an attribute option.booleanisPrintingAsComment()Returns whether generated output is a comment block.booleanisUsingVariables()Returns whether variables should be used.
-
-
-
Constructor Detail
-
PrintConfiguration
public PrintConfiguration(boolean printingAsComment, boolean usingVariables, ModelDefaults modelDefaults, java.util.List<java.lang.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 Detail
-
isPrintingAsComment
public boolean isPrintingAsComment()
Returns whether generated output is a comment block.- Returns:
- true if comment, else normal output
-
isUsingVariables
public boolean isUsingVariables()
Returns whether variables should be used.- Returns:
- true if tablename, classid and mapping are variables
-
getModelDefaults
public ModelDefaults getModelDefaults()
Gets the model defaults.- Returns:
- the defaults, null if none
-
getOptionAnnotations
public java.util.List<java.lang.String> 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
public boolean isOptionAnnotation(java.lang.String annotation)
Returns whether given annotation should be printed as an attribute option.- Parameters:
annotation- the annotation string- Returns:
- true if attribute option
-
-