java.lang.Object
org.tentackle.maven.plugin.wizard.pdodata.JavaCodeFactory

public class JavaCodeFactory extends Object
Factory generating Java code that creates PDOs.
  • Field Details

    • NOTEST_STEREOTYPE

      public static final String NOTEST_STEREOTYPE
      Stereotype for attributes and relations to skip test code generation.
      See Also:
    • distinctVariables

      public static boolean distinctVariables
      By default, the variables of the created entities are reused for the 2nd, 3rd, etc... instances. If this flag is true, the variables names are numbered starting at variableOffset.
    • variableOffset

      public static Integer variableOffset
      If distinctVariables is true, the variable names are numbered. If variableOffset is null, the first instance has no number, otherwise it starts with the given offset.
  • Method Details

    • generateCode

      public static String generateCode(Map<String,Boolean> codePaths, DataObject... dataObjects)
      Generates code from a data object template.
      Parameters:
      codePaths - optional code paths configuration map
      dataObjects - the data objects
      Returns:
      the Java code
    • generate

      public String generate()
      Generates the Java code.
      Returns:
      the code