Class PrintConfiguration

java.lang.Object
org.tentackle.model.print.PrintConfiguration

public class PrintConfiguration extends Object
Holds parameters to configure the generated output.
Author:
harald
  • 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 block
      usingVariables - use variables for tablename, classid and mapping
      modelDefaults - the model defaults, null if none
      optionAnnotations - annotations that should be printed as attribute options
      columnGap - 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

      public ModelDefaults getModelDefaults()
      Gets the model defaults.
      Returns:
      the defaults, null if none
    • getOptionAnnotations

      public List<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(String annotation)
      Returns whether given annotation should be printed as an attribute option.
      Parameters:
      annotation - the annotation string
      Returns:
      true if attribute option