Klasse GenerationTool

java.lang.Object
org.jooq.codegen.GenerationTool

public class GenerationTool extends Object
The GenerationTool takes care of generating Java code from a database schema.

It takes its configuration parameters from an XML file passed in either as a JAXB-annotated Configuration object, or from the file system when passed as an argument to main(String[]).

See http://www.jooq.org/xsd/ for the latest XSD specification.

Autor:
Lukas Eder
  • Felddetails

  • Konstruktordetails

    • GenerationTool

      public GenerationTool()
  • Methodendetails

    • setClassLoader

      public void setClassLoader(ClassLoader loader)
      The class loader to use with this generation tool.

      If set, all classes are loaded with this class loader

    • setConnection

      public void setConnection(Connection connection)
      The JDBC connection to use with this generation tool.

      If set, the configuration XML's <jdbc/> configuration is ignored, and this connection is used for meta data inspection, instead.

    • setDataSource

      public void setDataSource(DataSource dataSource)
      The JDBC data source to use with this generation tool.

      If set, the configuration XML's <jdbc/> configuration is ignored, and this connection is used for meta data inspection, instead.

    • main

      public static void main(String[] args) throws Exception
      Löst aus:
      Exception
    • main

      @Deprecated public static void main(Configuration configuration) throws Exception
      Veraltet.
      Löst aus:
      Exception
    • generate

      public static void generate(String xml) throws Exception
      Löst aus:
      Exception
    • generate

      public static void generate(Configuration configuration) throws Exception
      Löst aus:
      Exception
    • run

      public void run(Configuration configuration) throws Exception
      Löst aus:
      Exception
    • copyLarge

      public static long copyLarge(InputStream input, OutputStream output) throws IOException
      Copy bytes from a large (over 2GB) InputStream to an OutputStream.

      This method buffers the input internally, so there is no need to use a BufferedInputStream.

      Parameter:
      input - the InputStream to read from
      output - the OutputStream to write to
      Gibt zurück:
      the number of bytes copied
      Löst aus:
      NullPointerException - if the input or output is null
      IOException - if an I/O error occurs
      Seit:
      Commons IO 1.3
    • load

      public static Configuration load(InputStream in) throws IOException
      Load a jOOQ codegen configuration file from an input stream
      Löst aus:
      IOException