public class GenerationTool extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TARGET_DIRECTORY |
static String |
DEFAULT_TARGET_ENCODING |
static String |
DEFAULT_TARGET_PACKAGENAME |
| Constructor and Description |
|---|
GenerationTool() |
| Modifier and Type | Method and Description |
|---|---|
static long |
copyLarge(InputStream input,
OutputStream output)
Copy bytes from a large (over 2GB)
InputStream to an
OutputStream. |
static void |
generate(Configuration configuration) |
static void |
generate(String xml) |
static Configuration |
load(InputStream in)
Load a jOOQ codegen configuration file from an input stream
|
static void |
main(Configuration configuration)
Deprecated.
- Use
generate(Configuration) instead |
static void |
main(String[] args) |
void |
run(Configuration configuration) |
void |
setClassLoader(ClassLoader loader)
The class loader to use with this generation tool.
|
void |
setConnection(Connection connection)
The JDBC connection to use with this generation tool.
|
void |
setDataSource(DataSource dataSource)
The JDBC data source to use with this generation tool.
|
public static final String DEFAULT_TARGET_ENCODING
public static final String DEFAULT_TARGET_DIRECTORY
public static final String DEFAULT_TARGET_PACKAGENAME
public void setClassLoader(ClassLoader loader)
If set, all classes are loaded with this class loader
public void setConnection(Connection connection)
If set, the configuration XML's <jdbc/> configuration is
ignored, and this connection is used for meta data inspection, instead.
public void setDataSource(DataSource dataSource)
If set, the configuration XML's <jdbc/> configuration is
ignored, and this connection is used for meta data inspection, instead.
@Deprecated public static void main(Configuration configuration) throws Exception
generate(Configuration) insteadExceptionpublic static void generate(Configuration configuration) throws Exception
Exceptionpublic void run(Configuration configuration) throws Exception
Exceptionpublic static long copyLarge(InputStream input, OutputStream output) throws IOException
InputStream to an
OutputStream.
This method buffers the input internally, so there is no need to use a
BufferedInputStream.
input - the InputStream to read fromoutput - the OutputStream to write toNullPointerException - if the input or output is nullIOException - if an I/O error occurspublic static Configuration load(InputStream in) throws IOException
IOExceptionCopyright © 2018. All rights reserved.