Class PrintConfiguration


  • public class PrintConfiguration
    extends java.lang.Object
    Holds 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
      int getColumnGap()
      Gets the minimum number of spaces between columns in attribute section.
      ModelDefaults getModelDefaults()
      Gets the model defaults.
      java.util.List<java.lang.String> getOptionAnnotations()
      Gets the annotations that should be printed as attribute options.
      boolean isOptionAnnotation​(java.lang.String annotation)
      Returns whether given annotation should be printed as an attribute option.
      boolean isPrintingAsComment()
      Returns whether generated output is a comment block.
      boolean isUsingVariables()
      Returns whether variables should be used.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 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