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

public final class DomainSource extends Object
For instances use the factory method domainSource(SchemaDomain, String).
  • Method Details

    • 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.
    • writeApiImpl

      public void writeApiImpl(Path path) throws IOException
      Writes the api and implementation source code to the given path.
      Parameters:
      path - the path to write the source code to.
      Throws:
      IOException - in case of an I/O error.
    • writeCombined

      public void writeCombined(Path path) throws IOException
      Writes the combined source code to the given path.
      Parameters:
      path - the path to write the source code to.
      Throws:
      IOException - in case of an I/O error.
    • domainSource

      public static DomainSource domainSource(SchemaDomain domain, String sourcePackage)
      Instantiates a new DomainSource instance.
      Parameters:
      domain - the domain model to be used to generate the source code.
      sourcePackage - the source package.
      Returns:
      a new DomainSource instance.
    • apiSearchString

      public static String apiSearchString(EntityDefinition definition)
    • implSearchString

      public static String implSearchString(EntityDefinition definition)