java.lang.Object
is.codion.tools.generator.domain.DomainSource

public final class DomainSource extends Object
For instances use the builder provided by builder().
  • Method Details

    • builder

      public static DomainSource.Builder.DomainStep builder()
      Returns:
      a new DomainSource.Builder.DomainStep instance.
    • api

      public String api()
      Returns:
      the api source code.
    • implementation

      public String implementation()
      Returns:
      the implementation source code.
    • combined

      public String combined()
      Returns:
      the combined source code of the api and implementation.
    • i18n

      public String i18n()
      Returns:
      the i18n properties for all entities
    • writeApiImpl

      public boolean writeApiImpl(Path sourcePath, Path resourcePath, BooleanSupplier overwrite) throws IOException
      Writes the api and implementation source code to the given path.
      Parameters:
      sourcePath - the path to write the source files to
      resourcePath - the path to write the resources to
      overwrite - used to confirm overwrite if either of the api or impl files exist
      Returns:
      true if the files were written, false if overwriting was not confirmed
      Throws:
      IOException - in case of an I/O error.
    • writeCombined

      public boolean writeCombined(Path sourcePath, Path resourcePath, BooleanSupplier overwrite) throws IOException
      Writes the combined source code to the given path.
      Parameters:
      sourcePath - the path to write the source files to
      resourcePath - the path to write the resources to
      overwrite - used to confirm overwrite if either of the api or impl files exist
      Returns:
      true if the files were written, false if overwriting was not confirmed
      Throws:
      IOException - in case of an I/O error.
    • apiSearchString

      public static String apiSearchString(EntityDefinition definition)
    • implSearchString

      public static String implSearchString(EntityDefinition definition)
    • i18nSearchString

      public static String i18nSearchString(EntityDefinition definition)