Class 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.

    Author:
    Lukas Eder
    • Constructor Detail

      • GenerationTool

        public GenerationTool()
    • Method Detail

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

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

        Parameters:
        input - the InputStream to read from
        output - the OutputStream to write to
        Returns:
        the number of bytes copied
        Throws:
        NullPointerException - if the input or output is null
        IOException - if an I/O error occurs
        Since:
        Commons IO 1.3