diff --git a/.project b/.project
new file mode 100644
index 00000000000..9259477aa08
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+
+
+ jOOQ-trunk
+
+
+
+
+
+
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000000..14ab85a6b7d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,33 @@
+Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+All rights reserved.
+
+This software is licensed to you under the Apache License, Version 2.0
+(the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+. Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 00000000000..dd0e61cac1e
--- /dev/null
+++ b/README
@@ -0,0 +1,24 @@
+What's jOOQ
+===========
+
+jOOQ stands for Java Object Oriented Querying. It combines these essential features:
+
+ * Code Generation:
+ jOOQ generates a simple Java representation of your database schema. Every table, view, stored procedure, enum, UDT is a class.
+
+ * Active records:
+ jOOQ implements an easy-to-use active record pattern. It is NOT an OR-mapper, but provides a 1:1 mapping between tables/views and classes. Between columns and members.
+
+ * Typesafe SQL:
+ jOOQ allows for writing compile-time typesafe querying using its built-in DSL.
+
+ * SQL standard:
+ jOOQ supports all standard SQL language features including the more complex UNION's, nested SELECTs, joins, aliasing
+
+ * Vendor-specific feature support:
+ jOOQ encourages the use of vendor-specific extensions such as stored procedures, UDT's and ARRAY's, recursive queries, and many more.
+
+For more details please visit http://www.jooq.org
+
+Follow jOOQ on Twitter: http://twitter.com/#!/JavaOOQ
+... and on Wordpress: http://lukaseder.wordpress.com
diff --git a/authors.txt b/authors.txt
new file mode 100644
index 00000000000..078867a0a35
--- /dev/null
+++ b/authors.txt
@@ -0,0 +1,2 @@
+lukaseder = Lukas Eder
+Chrriis = Chrriis
diff --git a/jOOQ-codegen-maven-example/.classpath b/jOOQ-codegen-maven-example/.classpath
new file mode 100644
index 00000000000..783c2333c8d
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.classpath
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jOOQ-codegen-maven-example/.gitignore b/jOOQ-codegen-maven-example/.gitignore
new file mode 100644
index 00000000000..ea8c4bf7f35
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/jOOQ-codegen-maven-example/.project b/jOOQ-codegen-maven-example/.project
new file mode 100644
index 00000000000..c5ada0e7c47
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.project
@@ -0,0 +1,23 @@
+
+
+ jOOQ-codegen-maven-example
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.maven.ide.eclipse.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.core.prefs b/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..eea4bca85e9
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,350 @@
+#Sat Nov 05 12:53:40 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=1
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.ui.prefs b/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..b07f39ee3e9
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,116 @@
+#Sat Nov 05 13:02:50 CET 2011
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=true
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=false
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_jOOQ
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_jOOQ
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org.jooq;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\r\n * @return The ${bare_field_name}.\r\n *//**\r\n * @param ${param} the ${bare_field_name} to set\r\n *//**\r\n * ${tags}\r\n *//**\r\n * \r\n *//**\r\n * @author Lukas Eder\r\n *//**\r\n *\r\n *//**\r\n * ${tags}\r\n *//**\r\n * {@inheritDoc}\r\n *//**\r\n * ${tags}\r\n * ${see_to_target}\r\n *//**\r\n * Copyright (c) 2009-${year}, Lukas Eder, lukas.eder@gmail.com\r\n * All rights reserved.\r\n *\r\n * This software is licensed to you under the Apache License, Version 2.0\r\n * (the "License"); You may obtain a copy of the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met\:\r\n *\r\n * . Redistributions of source code must retain the above copyright notice, this\r\n * list of conditions and the following disclaimer.\r\n *\r\n * . Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * . Neither the name "jOOQ" nor the names of its contributors may be\r\n * used to endorse or promote products derived from this software without\r\n * specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}\r\n\r\n\r\n\r\n${exception_var}.printStackTrace();${body_statement}${body_statement}return ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/jOOQ-codegen-maven-example/.settings/org.maven.ide.eclipse.prefs b/jOOQ-codegen-maven-example/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000000..8bea9918fba
--- /dev/null
+++ b/jOOQ-codegen-maven-example/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Sun Apr 10 10:40:24 CEST 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/jOOQ-codegen-maven-example/LICENSE.txt b/jOOQ-codegen-maven-example/LICENSE.txt
new file mode 100644
index 00000000000..fd12d44afa0
--- /dev/null
+++ b/jOOQ-codegen-maven-example/LICENSE.txt
@@ -0,0 +1,33 @@
+ Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ All rights reserved.
+
+ This software is licensed to you under the Apache License, Version 2.0
+ (the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ . Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ . Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ . Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/jOOQ-codegen-maven-example/pom.xml b/jOOQ-codegen-maven-example/pom.xml
new file mode 100644
index 00000000000..9d8fd59d020
--- /dev/null
+++ b/jOOQ-codegen-maven-example/pom.xml
@@ -0,0 +1,398 @@
+
+
+ oss-parent
+ org.sonatype.oss
+ 7
+
+ 4.0.0
+
+ org.jooq
+ jooq-codegen-maven-example
+ 2.2.0
+ jar
+
+ jOOQ Codegen Maven
+ jOOQ effectively combines complex SQL, typesafety, source code generation, active records, stored procedures, advanced data types, and Java in a fluent, intuitive DSL.
+ http://www.jooq.org
+
+
+
+
+ Apache License, Version 2.0
+ http://www.jooq.org/inc/LICENSE.txt
+ repo
+
+
+
+
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+ https://jooq.svn.sourceforge.net/svnroot/jooq
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+
+
+
+ Trac
+ https://sourceforge.net/apps/trac/jooq/report/6
+
+
+
+
+ Lukas Eder
+ lukas.eder@gmail.com
+
+
+ Sander Plas
+ sander.plas@gmail.com
+
+
+
+
+
+ org.jooq
+ jooq
+ 2.2.0
+ jar
+ compile
+
+
+ junit
+ junit
+ 4.9
+ jar
+ test
+
+
+ postgresql
+ postgresql
+ 9.0-801.jdbc4
+ jar
+ test
+
+
+ net.sourceforge.jtds
+ jtds
+ 1.2.4
+ jar
+ test
+
+
+ mysql
+ mysql-connector-java
+ 5.1.18
+ jar
+ test
+
+
+ javax.persistence
+ persistence-api
+ 1.0.2
+ jar
+ true
+
+
+
+
+ UTF-8
+
+
+
+ deploy
+ ${project.artifactId}-${project.version}
+
+
+
+
+
+ org.jooq
+ jooq-codegen-maven
+ 2.2.0
+
+
+ exec1
+
+ generate
+
+
+
+ org.postgresql.Driver
+ jdbc:postgresql:postgres
+ public
+ postgres
+ test
+
+
+ org.jooq.util.DefaultGenerator
+
+ org.jooq.util.postgres.PostgresDatabase
+ .*
+
+ true
+
+
+ true
+ false
+ false
+ true
+
+
+ org.jooq.util.maven.example.postgres
+ target/generated-sources/jooq-postgres
+
+
+
+
+
+
+ exec2
+
+ generate
+
+
+
+ net.sourceforge.jtds.jdbc.Driver
+ jdbc:jtds:sybase://lukas-hp:5000/TEST
+ dbo
+ sa
+
+
+
+
+
+ org.jooq.util.DefaultGenerator
+
+ org.jooq.util.ase.ASEDatabase
+ t_.*,x_.*,v_.*,V_.*,p_.*,f_.*,(f|p)[0-9]+,s_.*
+
+
+
+ true
+ false
+ true
+ true
+
+
+ org.jooq.util.maven.example.ase
+ target/generated-sources/jooq-ase
+
+
+
+
+
+
+ exec3
+
+ generate
+
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost/test
+ root
+
+
+
+ org.jooq.util.DefaultGenerator
+
+ org.jooq.util.mysql.MySQLDatabase
+ .*
+ t_book_details
+ true
+
+
+ test
+ test2
+
+
+
+
+ BOOLEAN_10
+ 1,0
+
+
+ BOOLEAN_YN_UC
+ "Y",N
+
+
+ BOOLEAN_YN_LC
+ y,"n"
+
+
+ BOOLEAN_YES_NO_UC
+ "YES","NO"
+
+
+ BOOLEAN_YES_NO_LC
+ yes,no
+
+
+ BOOLEAN_TRUE_FALSE_UC
+ TRUE,FALSE
+
+
+ BOOLEAN_TRUE_FALSE_LC
+ true,false
+
+
+
+
+
+
+ BOOLEAN_10
+ (?i:(.*?\.)?T_BOOLEANS\.ONE_ZERO)
+
+
+ BOOLEAN_YN_UC
+ (?i:(.*?\.)?T_BOOLEANS\.Y_N_UC)
+
+
+ BOOLEAN_YN_LC
+ (?i:(.*?\.)?T_BOOLEANS\.Y_N_LC)
+
+
+ BOOLEAN_YES_NO_UC
+ (?i:(.*?\.)?T_BOOLEANS\.YES_NO_UC)
+
+
+ BOOLEAN_YES_NO_LC
+ (?i:(.*?\.)?T_BOOLEANS\.YES_NO_LC)
+
+
+ BOOLEAN_TRUE_FALSE_UC
+ (?i:(.*?\.)?T_BOOLEANS\.TRUE_FALSE_UC)
+
+
+ BOOLEAN_TRUE_FALSE_LC
+ (?i:(.*?\.)?T_BOOLEANS\.TRUE_FALSE_LC)
+
+
+
+
+ true
+ false
+ true
+ false
+ true
+ true
+
+
+ org.jooq.util.maven.example.mysql
+ target/generated-sources/jooq-mysql
+
+
+
+
+
+
+
+ net.sourceforge.jtds
+ jtds
+ 1.2.4
+
+
+ postgresql
+ postgresql
+ 8.4-702.jdbc4
+
+
+ mysql
+ mysql-connector-java
+ 5.1.18
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+ true
+ 512m
+ 256m
+ UTF-8
+ 1.6
+ 1.6
+ true
+ lines,vars,source
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.1.2
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ true
+ true
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.7
+
+
+ bundle-sources
+ package
+
+ jar
+
+
+
+
+ 512
+ UTF-8
+ protected
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.5
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-eclipse-plugin
+ 2.8
+
+ true
+
+
+
+
+
\ No newline at end of file
diff --git a/jOOQ-codegen-maven-example/src/main/resources/META-INF/LICENSE.txt b/jOOQ-codegen-maven-example/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 00000000000..fd12d44afa0
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,33 @@
+ Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ All rights reserved.
+
+ This software is licensed to you under the Apache License, Version 2.0
+ (the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ . Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ . Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ . Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/jOOQ-codegen-maven-example/src/main/resources/META-INF/README.txt b/jOOQ-codegen-maven-example/src/main/resources/META-INF/README.txt
new file mode 100644
index 00000000000..3e6e227e05b
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/main/resources/META-INF/README.txt
@@ -0,0 +1,2 @@
+Thanks for downloading jOOQ.
+Please visit http://www.jooq.org for more information.
\ No newline at end of file
diff --git a/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/Data.java b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/Data.java
new file mode 100644
index 00000000000..e429a1256a2
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/Data.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.test.util.maven;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Lukas Eder
+ */
+class Data {
+
+ static final List BOOK_IDS = Arrays.asList(1, 2, 3, 4);
+ static final List BOOK_TITLES = Arrays.asList("1984", "Animal Farm", "O Alquimista", "Brida");
+
+}
diff --git a/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestASE.java b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestASE.java
new file mode 100644
index 00000000000..531de8f205c
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestASE.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.test.util.maven;
+
+import static junit.framework.Assert.assertEquals;
+import static org.jooq.impl.Factory.countDistinct;
+import static org.jooq.util.maven.example.ase.Tables.T_AUTHOR;
+import static org.jooq.util.maven.example.ase.Tables.T_BOOK;
+import static org.jooq.util.maven.example.ase.Tables.T_BOOK_STORE;
+import static org.jooq.util.maven.example.ase.Tables.T_BOOK_TO_BOOK_STORE;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.jooq.Record;
+import org.jooq.Result;
+import org.jooq.util.maven.example.ase.DboFactory;
+import org.jooq.util.maven.example.ase.tables.TAuthor;
+import org.jooq.util.maven.example.ase.tables.TBook;
+import org.jooq.util.maven.example.ase.tables.TBookStore;
+import org.jooq.util.maven.example.ase.tables.TBookToBookStore;
+
+import org.junit.Test;
+
+/**
+ * @author Lukas Eder
+ */
+public class TestASE {
+
+ @Test
+ public void testInstanceModel() throws Exception {
+ Class.forName("net.sourceforge.jtds.jdbc.Driver");
+ Connection connection = DriverManager.getConnection("jdbc:jtds:sybase://lukas-hp:5000/TEST", "sa", "");
+ DboFactory create = new DboFactory(connection);
+
+ TBook b = T_BOOK.as("b");
+ TAuthor a = T_AUTHOR.as("a");
+ TBookStore s = T_BOOK_STORE.as("s");
+ TBookToBookStore t = T_BOOK_TO_BOOK_STORE.as("t");
+
+ Result result =
+ create.select(a.FIRST_NAME, a.LAST_NAME, countDistinct(s.NAME))
+ .from(a)
+ .join(b).on(b.AUTHOR_ID.equal(a.ID))
+ .join(t).on(t.BOOK_ID.equal(b.ID))
+ .join(s).on(t.BOOK_STORE_NAME.equal(s.NAME))
+ .groupBy(a.FIRST_NAME, a.LAST_NAME)
+ .orderBy(countDistinct(s.NAME).desc())
+ .fetch();
+
+ assertEquals(2, result.size());
+ assertEquals("Paulo", result.getValue(0, a.FIRST_NAME));
+ assertEquals("George", result.getValue(1, a.FIRST_NAME));
+
+ assertEquals("Coelho", result.getValue(0, a.LAST_NAME));
+ assertEquals("Orwell", result.getValue(1, a.LAST_NAME));
+
+ assertEquals(Integer.valueOf(3), result.getValue(0, countDistinct(s.NAME)));
+ assertEquals(Integer.valueOf(2), result.getValue(1, countDistinct(s.NAME)));
+ }
+}
diff --git a/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestMySQL.java b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestMySQL.java
new file mode 100644
index 00000000000..39cab53fb66
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestMySQL.java
@@ -0,0 +1,137 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.test.util.maven;
+
+import static junit.framework.Assert.assertEquals;
+import static org.jooq.impl.Factory.countDistinct;
+import static org.jooq.util.maven.example.mysql.Tables.T_AUTHOR;
+import static org.jooq.util.maven.example.mysql.Tables.T_BOOK;
+import static org.jooq.util.maven.example.mysql.Tables.T_BOOK_STORE;
+import static org.jooq.util.maven.example.mysql.Tables.T_BOOK_TO_BOOK_STORE;
+import static org.jooq.util.maven.example.mysql.Tables.T_BOOLEANS;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.jooq.Record;
+import org.jooq.Result;
+import org.jooq.util.maven.example.mysql.Test2Factory;
+import org.jooq.util.maven.example.mysql.enums.BooleanTrueFalseLc;
+import org.jooq.util.maven.example.mysql.enums.BooleanTrueFalseUc;
+import org.jooq.util.maven.example.mysql.enums.BooleanYesNoLc;
+import org.jooq.util.maven.example.mysql.enums.BooleanYesNoUc;
+import org.jooq.util.maven.example.mysql.enums.BooleanYnLc;
+import org.jooq.util.maven.example.mysql.enums.BooleanYnUc;
+import org.jooq.util.maven.example.mysql.enums.Boolean_10;
+import org.jooq.util.maven.example.mysql.tables.TAuthor;
+import org.jooq.util.maven.example.mysql.tables.TBook;
+import org.jooq.util.maven.example.mysql.tables.TBookStore;
+import org.jooq.util.maven.example.mysql.tables.TBookToBookStore;
+import org.jooq.util.maven.example.mysql.tables.records.TBooleansRecord;
+
+import org.junit.Test;
+
+/**
+ * @author Lukas Eder
+ */
+public class TestMySQL {
+
+ @Test
+ public void testInstanceModel() throws Exception {
+ Class.forName("com.mysql.jdbc.Driver");
+ Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test2", "root", "");
+ Test2Factory create = new Test2Factory(connection);
+
+ TBook b = T_BOOK.as("b");
+ TAuthor a = T_AUTHOR.as("a");
+ TBookStore s = T_BOOK_STORE.as("s");
+ TBookToBookStore t = T_BOOK_TO_BOOK_STORE.as("t");
+
+ Result result =
+ create.select(a.FIRST_NAME, a.LAST_NAME, countDistinct(s.NAME))
+ .from(a)
+ .join(b).on(b.AUTHOR_ID.equal(a.ID))
+ .join(t).on(t.BOOK_ID.equal(b.ID))
+ .join(s).on(t.BOOK_STORE_NAME.equal(s.NAME))
+ .groupBy(a.FIRST_NAME, a.LAST_NAME)
+ .orderBy(countDistinct(s.NAME).desc())
+ .fetch();
+
+ assertEquals(2, result.size());
+ assertEquals("Paulo", result.getValue(0, a.FIRST_NAME));
+ assertEquals("George", result.getValue(1, a.FIRST_NAME));
+
+ assertEquals("Coelho", result.getValue(0, a.LAST_NAME));
+ assertEquals("Orwell", result.getValue(1, a.LAST_NAME));
+
+ assertEquals(Integer.valueOf(3), result.getValue(0, countDistinct(s.NAME)));
+ assertEquals(Integer.valueOf(2), result.getValue(1, countDistinct(s.NAME)));
+ }
+
+ @Test
+ public void testCustomEnum() throws Exception {
+ Class.forName("com.mysql.jdbc.Driver");
+ Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test2", "root", "");
+ Test2Factory create = new Test2Factory(connection);
+
+ create.delete(T_BOOLEANS).execute();
+
+ assertEquals(1,
+ create.insertInto(T_BOOLEANS)
+ .set(T_BOOLEANS.ID, 1)
+ .set(T_BOOLEANS.ONE_ZERO, Boolean_10._0)
+ .set(T_BOOLEANS.TRUE_FALSE_LC, BooleanTrueFalseLc.true_)
+ .set(T_BOOLEANS.TRUE_FALSE_UC, BooleanTrueFalseUc.FALSE)
+ .set(T_BOOLEANS.Y_N_LC, BooleanYnLc.y)
+ .set(T_BOOLEANS.Y_N_UC, BooleanYnUc.N)
+ .set(T_BOOLEANS.YES_NO_LC, BooleanYesNoLc.yes)
+ .set(T_BOOLEANS.YES_NO_UC, BooleanYesNoUc.NO)
+ .execute());
+
+ TBooleansRecord bool = create.selectFrom(T_BOOLEANS).fetchOne();
+ assertEquals(1, (int) bool.getId());
+ assertEquals(Boolean_10._0, bool.getOneZero());
+ assertEquals(BooleanTrueFalseLc.true_, bool.getTrueFalseLc());
+ assertEquals(BooleanTrueFalseUc.FALSE, bool.getTrueFalseUc());
+ assertEquals(BooleanYnLc.y, bool.getYNLc());
+ assertEquals(BooleanYnUc.N, bool.getYNUc());
+ assertEquals(BooleanYesNoLc.yes, bool.getYesNoLc());
+ assertEquals(BooleanYesNoUc.NO, bool.getYesNoUc());
+
+ assertEquals(1,
+ create.delete(T_BOOLEANS).execute());
+ }
+}
diff --git a/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestPostgres.java b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestPostgres.java
new file mode 100644
index 00000000000..ca4d7e493b5
--- /dev/null
+++ b/jOOQ-codegen-maven-example/src/test/java/org/jooq/test/util/maven/TestPostgres.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.test.util.maven;
+
+import static junit.framework.Assert.assertEquals;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.List;
+
+import org.jooq.Record;
+import org.jooq.Result;
+import org.jooq.util.maven.example.postgres.PublicFactory;
+import org.jooq.util.maven.example.postgres.tables.TBook;
+import org.jooq.util.maven.example.postgres.tables.records.TBookRecord;
+
+import org.junit.Test;
+
+/**
+ * @author Lukas Eder
+ */
+public class TestPostgres {
+
+ @Test
+ public void testFetch() throws Exception {
+ Connection connection = DriverManager.getConnection("jdbc:postgresql:postgres", "postgres", "test");
+ PublicFactory create = new PublicFactory(connection);
+
+ Result books =
+ create.select(TBook.ID, TBook.TITLE)
+ .from(TBook.T_BOOK)
+ .orderBy(TBook.ID)
+ .fetch();
+
+ assertEquals(Data.BOOK_IDS, books.getValues(0));
+ assertEquals(Data.BOOK_TITLES, books.getValues(1));
+ }
+
+ @Test
+ public void testFetchInto() throws Exception {
+ Connection connection = DriverManager.getConnection("jdbc:postgresql:postgres", "postgres", "test");
+ PublicFactory create = new PublicFactory(connection);
+
+ List books =
+ create.select(TBook.ID, TBook.TITLE)
+ .from(TBook.T_BOOK)
+ .orderBy(TBook.ID)
+ .fetchInto(TBookRecord.class);
+
+ for (int i = 0; i < Data.BOOK_IDS.size(); i++) {
+ assertEquals(Data.BOOK_IDS.get(i), books.get(i).getId());
+ assertEquals(Data.BOOK_TITLES.get(i), books.get(i).getTitle());
+ }
+ }
+}
diff --git a/jOOQ-codegen-maven/.classpath b/jOOQ-codegen-maven/.classpath
new file mode 100644
index 00000000000..c0227443546
--- /dev/null
+++ b/jOOQ-codegen-maven/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/jOOQ-codegen-maven/.gitignore b/jOOQ-codegen-maven/.gitignore
new file mode 100644
index 00000000000..ea8c4bf7f35
--- /dev/null
+++ b/jOOQ-codegen-maven/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/jOOQ-codegen-maven/.project b/jOOQ-codegen-maven/.project
new file mode 100644
index 00000000000..8e34f049306
--- /dev/null
+++ b/jOOQ-codegen-maven/.project
@@ -0,0 +1,23 @@
+
+
+ jOOQ-codegen-maven
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.maven.ide.eclipse.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/jOOQ-codegen-maven/.settings/org.eclipse.jdt.core.prefs b/jOOQ-codegen-maven/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..eea4bca85e9
--- /dev/null
+++ b/jOOQ-codegen-maven/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,350 @@
+#Sat Nov 05 12:53:40 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=1
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/jOOQ-codegen-maven/.settings/org.eclipse.jdt.ui.prefs b/jOOQ-codegen-maven/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..b07f39ee3e9
--- /dev/null
+++ b/jOOQ-codegen-maven/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,116 @@
+#Sat Nov 05 13:02:50 CET 2011
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=true
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=false
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_jOOQ
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_jOOQ
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org.jooq;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\r\n * @return The ${bare_field_name}.\r\n *//**\r\n * @param ${param} the ${bare_field_name} to set\r\n *//**\r\n * ${tags}\r\n *//**\r\n * \r\n *//**\r\n * @author Lukas Eder\r\n *//**\r\n *\r\n *//**\r\n * ${tags}\r\n *//**\r\n * {@inheritDoc}\r\n *//**\r\n * ${tags}\r\n * ${see_to_target}\r\n *//**\r\n * Copyright (c) 2009-${year}, Lukas Eder, lukas.eder@gmail.com\r\n * All rights reserved.\r\n *\r\n * This software is licensed to you under the Apache License, Version 2.0\r\n * (the "License"); You may obtain a copy of the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met\:\r\n *\r\n * . Redistributions of source code must retain the above copyright notice, this\r\n * list of conditions and the following disclaimer.\r\n *\r\n * . Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * . Neither the name "jOOQ" nor the names of its contributors may be\r\n * used to endorse or promote products derived from this software without\r\n * specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}\r\n\r\n\r\n\r\n${exception_var}.printStackTrace();${body_statement}${body_statement}return ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/jOOQ-codegen-maven/.settings/org.maven.ide.eclipse.prefs b/jOOQ-codegen-maven/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000000..8bea9918fba
--- /dev/null
+++ b/jOOQ-codegen-maven/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Sun Apr 10 10:40:24 CEST 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/jOOQ-codegen-maven/LICENSE.txt b/jOOQ-codegen-maven/LICENSE.txt
new file mode 100644
index 00000000000..fd12d44afa0
--- /dev/null
+++ b/jOOQ-codegen-maven/LICENSE.txt
@@ -0,0 +1,33 @@
+ Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ All rights reserved.
+
+ This software is licensed to you under the Apache License, Version 2.0
+ (the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ . Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ . Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ . Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/jOOQ-codegen-maven/pom.xml b/jOOQ-codegen-maven/pom.xml
new file mode 100644
index 00000000000..621b412c3a3
--- /dev/null
+++ b/jOOQ-codegen-maven/pom.xml
@@ -0,0 +1,173 @@
+
+
+ oss-parent
+ org.sonatype.oss
+ 7
+
+ 4.0.0
+
+ org.jooq
+ jooq-codegen-maven
+ 2.2.0
+ maven-plugin
+
+ jOOQ Codegen Maven
+ jOOQ effectively combines complex SQL, typesafety, source code generation, active records, stored procedures, advanced data types, and Java in a fluent, intuitive DSL.
+ http://www.jooq.org
+
+
+
+
+ Apache License, Version 2.0
+ http://www.jooq.org/inc/LICENSE.txt
+ repo
+
+
+
+
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+ https://jooq.svn.sourceforge.net/svnroot/jooq
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+
+
+
+ Trac
+ https://sourceforge.net/apps/trac/jooq/report/6
+
+
+
+
+ Lukas Eder
+ lukas.eder@gmail.com
+
+
+ Sander Plas
+ sander.plas@gmail.com
+
+
+
+
+ deploy
+ ${project.artifactId}-${project.version}
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+ true
+ 512m
+ 256m
+ UTF-8
+ 1.6
+ 1.6
+ true
+ lines,vars,source
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.1.2
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ true
+ true
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.7
+
+
+ bundle-sources
+ package
+
+ jar
+
+
+
+
+ 512
+ UTF-8
+ protected
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.5
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-eclipse-plugin
+ 2.8
+
+ true
+
+
+
+
+
+
+
+ junit
+ junit
+ 3.8.1
+ test
+
+
+ org.apache.maven
+ maven-plugin-api
+ 2.2.1
+
+
+ org.jooq
+ jooq-codegen
+ 2.2.0
+ jar
+
+
+ org.apache.maven
+ maven-project
+ 2.2.1
+ jar
+
+
+
diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java
new file mode 100644
index 00000000000..9c11a56c4ff
--- /dev/null
+++ b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.util.maven;
+
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXB;
+
+import org.jooq.util.GenerationTool;
+import org.jooq.util.jaxb.Configuration;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @goal generate
+ * @phase generate-sources
+ * @version $Id$
+ * @author Sander Plas
+ */
+public class Plugin extends AbstractMojo {
+
+ /**
+ * The Maven project.
+ *
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
+ */
+ private MavenProject project;
+
+ /**
+ * The jdbc settings.
+ *
+ * @parameter
+ */
+ private org.jooq.util.jaxb.Jdbc jdbc;
+
+ /**
+ * The generator settings
+ *
+ * @parameter
+ */
+ private org.jooq.util.jaxb.Generator generator;
+
+ @Override
+ public void execute() throws MojoExecutionException {
+ try {
+ Configuration configuration = new Configuration();
+ configuration.setJdbc(jdbc);
+ configuration.setGenerator(generator);
+
+ StringWriter writer = new StringWriter();
+ JAXB.marshal(configuration, writer);
+
+ getLog().info("Using this configuration:\n" + writer.toString());
+ GenerationTool.main(configuration);
+ }
+ catch (Exception ex) {
+ throw new MojoExecutionException("Error running jOOQ code generation tool", ex);
+ }
+ project.addCompileSourceRoot(generator.getTarget().getDirectory());
+ }
+}
diff --git a/jOOQ-codegen-maven/src/main/resources/META-INF/LICENSE.txt b/jOOQ-codegen-maven/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 00000000000..fd12d44afa0
--- /dev/null
+++ b/jOOQ-codegen-maven/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,33 @@
+ Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ All rights reserved.
+
+ This software is licensed to you under the Apache License, Version 2.0
+ (the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ . Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ . Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ . Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/jOOQ-codegen-maven/src/main/resources/META-INF/README.txt b/jOOQ-codegen-maven/src/main/resources/META-INF/README.txt
new file mode 100644
index 00000000000..3e6e227e05b
--- /dev/null
+++ b/jOOQ-codegen-maven/src/main/resources/META-INF/README.txt
@@ -0,0 +1,2 @@
+Thanks for downloading jOOQ.
+Please visit http://www.jooq.org for more information.
\ No newline at end of file
diff --git a/jOOQ-codegen/.classpath b/jOOQ-codegen/.classpath
new file mode 100644
index 00000000000..9b3745e6d46
--- /dev/null
+++ b/jOOQ-codegen/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/jOOQ-codegen/.gitignore b/jOOQ-codegen/.gitignore
new file mode 100644
index 00000000000..ea8c4bf7f35
--- /dev/null
+++ b/jOOQ-codegen/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/jOOQ-codegen/.project b/jOOQ-codegen/.project
new file mode 100644
index 00000000000..9787bc3fcaa
--- /dev/null
+++ b/jOOQ-codegen/.project
@@ -0,0 +1,23 @@
+
+
+ jOOQ-codegen
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.maven.ide.eclipse.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/jOOQ-codegen/.settings/org.eclipse.jdt.core.prefs b/jOOQ-codegen/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..eea4bca85e9
--- /dev/null
+++ b/jOOQ-codegen/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,350 @@
+#Sat Nov 05 12:53:40 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=1
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/jOOQ-codegen/.settings/org.eclipse.jdt.ui.prefs b/jOOQ-codegen/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..b07f39ee3e9
--- /dev/null
+++ b/jOOQ-codegen/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,116 @@
+#Sat Nov 05 13:02:50 CET 2011
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=true
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=false
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_jOOQ
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_jOOQ
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org.jooq;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=/**\r\n * @return The ${bare_field_name}.\r\n *//**\r\n * @param ${param} the ${bare_field_name} to set\r\n *//**\r\n * ${tags}\r\n *//**\r\n * \r\n *//**\r\n * @author Lukas Eder\r\n *//**\r\n *\r\n *//**\r\n * ${tags}\r\n *//**\r\n * {@inheritDoc}\r\n *//**\r\n * ${tags}\r\n * ${see_to_target}\r\n *//**\r\n * Copyright (c) 2009-${year}, Lukas Eder, lukas.eder@gmail.com\r\n * All rights reserved.\r\n *\r\n * This software is licensed to you under the Apache License, Version 2.0\r\n * (the "License"); You may obtain a copy of the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met\:\r\n *\r\n * . Redistributions of source code must retain the above copyright notice, this\r\n * list of conditions and the following disclaimer.\r\n *\r\n * . Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n *\r\n * . Neither the name "jOOQ" nor the names of its contributors may be\r\n * used to endorse or promote products derived from this software without\r\n * specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n * POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}\r\n\r\n\r\n\r\n${exception_var}.printStackTrace();${body_statement}${body_statement}return ${field};${field} \= ${param};
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/jOOQ-codegen/.settings/org.maven.ide.eclipse.prefs b/jOOQ-codegen/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000000..8bea9918fba
--- /dev/null
+++ b/jOOQ-codegen/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Sun Apr 10 10:40:24 CEST 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/jOOQ-codegen/LICENSE.txt b/jOOQ-codegen/LICENSE.txt
new file mode 100644
index 00000000000..fd12d44afa0
--- /dev/null
+++ b/jOOQ-codegen/LICENSE.txt
@@ -0,0 +1,33 @@
+ Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ All rights reserved.
+
+ This software is licensed to you under the Apache License, Version 2.0
+ (the "License"); You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ . Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ . Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ . Neither the name "jOOQ" nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/jOOQ-codegen/pom.xml b/jOOQ-codegen/pom.xml
new file mode 100644
index 00000000000..375a0a8f9ff
--- /dev/null
+++ b/jOOQ-codegen/pom.xml
@@ -0,0 +1,195 @@
+
+
+
+ oss-parent
+ org.sonatype.oss
+ 7
+
+ 4.0.0
+
+ org.jooq
+ jooq-codegen
+ 2.2.0
+ jar
+
+ jOOQ Codegen
+ jOOQ effectively combines complex SQL, typesafety, source code generation, active records, stored procedures, advanced data types, and Java in a fluent, intuitive DSL.
+ http://www.jooq.org
+
+
+
+
+ Apache License, Version 2.0
+ http://www.jooq.org/inc/LICENSE.txt
+ repo
+
+
+
+
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+ https://jooq.svn.sourceforge.net/svnroot/jooq
+ scm:svn:https://jooq.svn.sourceforge.net/svnroot/jooq
+
+
+
+ deploy
+ ${project.artifactId}-${project.version}
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+ true
+ 512m
+ 256m
+ UTF-8
+ 1.6
+ 1.6
+ true
+ lines,vars,source
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.1.2
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ true
+ true
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.7
+
+
+ bundle-sources
+ package
+
+ jar
+
+
+
+
+ 512
+ UTF-8
+ protected
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.5
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-eclipse-plugin
+ 2.8
+
+ true
+
+
+
+
+
+
+ Trac
+ https://sourceforge.net/apps/trac/jooq/report/6
+
+
+
+
+ Lukas Eder
+ lukas.eder@gmail.com
+
+
+ Espen Stromsnes
+ estromsnes@gmail.com
+
+
+
+
+
+ org.jooq
+ jooq
+ 2.2.0
+ jar
+ compile
+
+
+ org.jooq
+ jooq-meta
+ 2.2.0
+ jar
+ compile
+
+
+ org.apache.ant
+ ant
+ 1.8.2
+ provided
+ true
+
+
+ org.slf4j
+ integration
+ 1.6.1
+ jar
+ test
+ true
+
+
+ org.slf4j
+ slf4j-log4j12
+ 1.6.1
+ jar
+ test
+ true
+
+
+ log4j
+ log4j
+ 1.2.16
+ test
+ true
+
+
+
\ No newline at end of file
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/AbstractGeneratorStrategy.java b/jOOQ-codegen/src/main/java/org/jooq/util/AbstractGeneratorStrategy.java
new file mode 100644
index 00000000000..16bb6d51171
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/AbstractGeneratorStrategy.java
@@ -0,0 +1,163 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.util;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * Common base class for convenience method abstraction
+ *
+ * @author Lukas Eder
+ */
+public abstract class AbstractGeneratorStrategy implements GeneratorStrategy {
+
+ // -------------------------------------------------------------------------
+ // Strategy methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public final String getFileName(Definition definition) {
+ return getFileName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getFileName(Definition definition, Mode mode) {
+ return getJavaClassName(definition, mode) + ".java";
+ }
+
+ @Override
+ public final File getFile(Definition definition) {
+ return getFile(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final File getFile(Definition definition, Mode mode) {
+ String dir = getTargetDirectory();
+ String pkg = getJavaPackageName(definition, mode).replaceAll("\\.", "/");
+ return new File(dir + "/" + pkg, getFileName(definition, mode));
+ }
+
+ @Override
+ public final String getFullJavaIdentifier(Definition definition) {
+ StringBuilder sb = new StringBuilder();
+
+ // Columns
+ if (definition instanceof ColumnDefinition) {
+ TypedElementDefinition> e = (TypedElementDefinition>) definition;
+
+ if (getInstanceFields()) {
+ sb.append(getFullJavaIdentifier(e.getContainer()));
+ }
+ else {
+ sb.append(getFullJavaClassName(e.getContainer()));
+ }
+ }
+
+ // Attributes, Parameters
+ else if (definition instanceof TypedElementDefinition) {
+ TypedElementDefinition> e = (TypedElementDefinition>) definition;
+ sb.append(getFullJavaClassName(e.getContainer()));
+ }
+
+ // Table, UDT, Schema, etc
+ else {
+ sb.append(getFullJavaClassName(definition));
+ }
+
+ sb.append(".");
+ sb.append(getJavaIdentifier(definition));
+
+ return sb.toString();
+ }
+
+ @Override
+ public final String getJavaSetterName(Definition definition) {
+ return getJavaSetterName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaGetterName(Definition definition) {
+ return getJavaGetterName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaMethodName(Definition definition) {
+ return getJavaMethodName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaClassExtends(Definition definition) {
+ return getJavaClassExtends(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final List getJavaClassImplements(Definition definition) {
+ return getJavaClassImplements(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaClassName(Definition definition) {
+ return getJavaClassName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaPackageName(Definition definition) {
+ return getJavaPackageName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getJavaMemberName(Definition definition) {
+ return getJavaMemberName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getFullJavaClassName(Definition definition) {
+ return getFullJavaClassName(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public final String getFullJavaClassName(Definition definition, Mode mode) {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append(getJavaPackageName(definition, mode));
+ sb.append(".");
+ sb.append(getJavaClassName(definition, mode));
+
+ return sb.toString();
+ }
+
+}
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java
new file mode 100644
index 00000000000..25c72fea4b2
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java
@@ -0,0 +1,2967 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jooq.util;
+
+
+import static org.jooq.util.GenerationUtil.convertToJavaIdentifier;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.reflect.TypeVariable;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jooq.Configuration;
+import org.jooq.Constants;
+import org.jooq.DataType;
+import org.jooq.EnumType;
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.MasterDataType;
+import org.jooq.Parameter;
+import org.jooq.Record;
+import org.jooq.Result;
+import org.jooq.Select;
+import org.jooq.Sequence;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UDT;
+import org.jooq.UDTField;
+import org.jooq.UniqueKey;
+import org.jooq.conf.Settings;
+import org.jooq.exception.DataAccessException;
+import org.jooq.exception.SQLDialectNotSupportedException;
+import org.jooq.impl.AbstractKeys;
+import org.jooq.impl.AbstractRoutine;
+import org.jooq.impl.ArrayRecordImpl;
+import org.jooq.impl.FieldTypeHelper;
+import org.jooq.impl.PackageImpl;
+import org.jooq.impl.SQLDataType;
+import org.jooq.impl.SchemaImpl;
+import org.jooq.impl.SequenceImpl;
+import org.jooq.impl.TableImpl;
+import org.jooq.impl.TableRecordImpl;
+import org.jooq.impl.UDTImpl;
+import org.jooq.impl.UDTRecordImpl;
+import org.jooq.impl.UpdatableRecordImpl;
+import org.jooq.impl.UpdatableTableImpl;
+import org.jooq.tools.JooqLogger;
+import org.jooq.tools.StopWatch;
+import org.jooq.tools.StringUtils;
+import org.jooq.util.GeneratorStrategy.Mode;
+
+
+/**
+ * A default implementation for code generation. Replace this code with your own
+ * logic, if you need your database schema represented in a different way.
+ *
");
+ }
+ }
+
+ printDeprecation(out, deprecation);
+
+ out.println("\t */");
+
+ if (deprecation != null) {
+ out.println("\t@Deprecated");
+ }
+ }
+
+ private void printDeprecation(GenerationWriter out, String deprecation) {
+ if (deprecation != null) {
+ out.println("\t *");
+
+ String[] strings = deprecation.split("[\n\r]+");
+ for (int i = 0; i < strings.length; i++) {
+ if (i == 0) {
+ out.println("\t * @deprecated " + strings[i]);
+ }
+ else {
+ out.println("\t * " + strings[i]);
+ }
+ }
+ }
+ }
+
+ private void printNoFurtherInstancesAllowedJavadoc(GenerationWriter out) {
+ printJavadoc(out, "No further instances allowed");
+ }
+
+ private void printJavadoc(GenerationWriter out, String doc) {
+ out.println("\t/**");
+ out.println("\t * " + doc);
+ out.println("\t */");
+ }
+
+ private void printClassJavadoc(GenerationWriter out, Definition definition) {
+ printClassJavadoc(out, definition.getComment());
+ }
+
+ private void printClassJavadoc(GenerationWriter out, String comment) {
+ printClassJavadoc(out, comment, null);
+ }
+
+ private void printClassJavadoc(GenerationWriter out, String comment, String deprecation) {
+ out.println("/**");
+ out.println(" * This class is generated by jOOQ.");
+
+ if (comment != null && comment.length() > 0) {
+ out.println(" *");
+ out.println(" * " + comment);
+ }
+
+ if (deprecation != null && deprecation.length() > 0) {
+ out.println(" *");
+ out.println(" * @deprecated : " + deprecation);
+ }
+
+ out.println(" */");
+
+ if (generateGeneratedAnnotation()) {
+ out.println(
+ "@javax.annotation.Generated(value = {\"http://www.jooq.org\", \"" + Constants.VERSION + "\"},\n" +
+ " comments = \"This class is generated by jOOQ\")");
+ }
+
+ if (deprecation != null && deprecation.length() > 0) {
+ out.println("@Deprecated");
+ }
+
+ out.printSuppressWarningsPlaceholder();
+ }
+
+ private void printHeader(GenerationWriter out, Definition definition) {
+ printHeader(out, definition, Mode.DEFAULT);
+ }
+
+ private void printHeader(GenerationWriter out, Definition definition, Mode mode) {
+ out.println("/**");
+ out.println(" * This class is generated by jOOQ");
+ out.println(" */");
+ out.println("package " + strategy.getJavaPackageName(definition, mode) + ";");
+ out.println();
+ }
+
+ private void printExtendsNumberType(GenerationWriter out, DataTypeDefinition type) throws SQLException {
+ printNumberType(out, type, "? extends ");
+ }
+
+ private void printNumberType(GenerationWriter out, DataTypeDefinition type) throws SQLException {
+ printNumberType(out, type, "");
+ }
+
+ private void printNumberType(GenerationWriter out, DataTypeDefinition type, String prefix) throws SQLException {
+ if (type.isGenericNumberType()) {
+ out.print(prefix);
+ out.print(Number.class);
+ }
+ else {
+ out.print(getJavaType(type));
+ }
+ }
+
+ private String getSimpleJavaType(DataTypeDefinition type) throws SQLException {
+ return GenerationUtil.getSimpleJavaType(getJavaType(type));
+ }
+
+ private String getJavaTypeReference(Database db, DataTypeDefinition type) throws SQLException {
+ if (type instanceof MasterDataTypeDefinition) {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append(getJavaTypeReference(db, ((MasterDataTypeDefinition) type).underlying));
+ sb.append(".asMasterDataType(");
+ sb.append(getJavaType(type));
+ sb.append(".class)");
+
+ return sb.toString();
+ }
+
+ else {
+ if (db.isArrayType(type.getType())) {
+ String baseType = GenerationUtil.getArrayBaseType(db.getDialect(), type.getType(), type.getUserType());
+ return getTypeReference(db, type.getSchema(), baseType, 0, 0, baseType) + ".getArrayDataType()";
+ }
+ else {
+ return getTypeReference(db, type.getSchema(), type.getType(), type.getPrecision(), type.getScale(), type.getUserType());
+ }
+ }
+ }
+
+ private String getJavaType(DataTypeDefinition type) throws SQLException {
+ if (type instanceof MasterDataTypeDefinition) {
+ return strategy.getFullJavaClassName(((MasterDataTypeDefinition) type).table);
+ }
+ else {
+ return getType(
+ type.getDatabase(),
+ type.getSchema(),
+ type.getType(),
+ type.getPrecision(),
+ type.getScale(),
+ type.getUserType(),
+ Object.class.getName());
+ }
+ }
+
+ private String getType(Database db, SchemaDefinition schema, String t, int p, int s, String u, String defaultType) throws SQLException {
+ String type = defaultType;
+
+ // Array types
+ if (db.isArrayType(t)) {
+ String baseType = GenerationUtil.getArrayBaseType(db.getDialect(), t, u);
+ type = getType(db, schema, baseType, p, s, baseType, defaultType) + "[]";
+ }
+
+ // Check for Oracle-style VARRAY types
+ else if (db.getArray(schema, u) != null) {
+ type = strategy.getFullJavaClassName(db.getArray(schema, u), Mode.RECORD);
+ }
+
+ // Check for ENUM types
+ else if (db.getEnum(schema, u) != null) {
+ type = strategy.getFullJavaClassName(db.getEnum(schema, u));
+ }
+
+ // Check for UDTs
+ else if (db.getUDT(schema, u) != null) {
+ type = strategy.getFullJavaClassName(db.getUDT(schema, u), Mode.RECORD);
+ }
+
+ // Check for custom types
+ else if (db.getConfiguredCustomType(u) != null) {
+ type = u;
+ }
+
+ // Try finding a basic standard SQL type according to the current dialect
+ else {
+ try {
+ Class> clazz = FieldTypeHelper.getDialectJavaType(db.getDialect(), t, p, s);
+ type = clazz.getCanonicalName();
+
+ if (clazz.getTypeParameters().length > 0) {
+ type += "<";
+
+ String separator = "";
+ for (TypeVariable> var : clazz.getTypeParameters()) {
+ type += separator;
+ type += ((Class>) var.getBounds()[0]).getCanonicalName();
+
+ separator = ", ";
+ }
+
+ type += ">";
+ }
+ }
+ catch (SQLDialectNotSupportedException e) {
+ if (defaultType == null) {
+ throw e;
+ }
+ }
+ }
+
+ return type;
+ }
+
+ private String getTypeReference(Database db, SchemaDefinition schema, String t, int p, int s, String u) throws SQLException {
+ StringBuilder sb = new StringBuilder();
+ if (db.getArray(schema, u) != null) {
+ ArrayDefinition array = db.getArray(schema, u);
+
+ sb.append(getJavaTypeReference(db, array.getElementType()));
+ sb.append(".asArrayDataType(");
+ sb.append(strategy.getFullJavaClassName(array, Mode.RECORD));
+ sb.append(".class)");
+ }
+ else if (db.getUDT(schema, u) != null) {
+ UDTDefinition udt = db.getUDT(schema, u);
+
+ sb.append(strategy.getFullJavaIdentifier(udt));
+ sb.append(".getDataType()");
+ }
+ else if (db.getEnum(schema, u) != null) {
+ sb.append("org.jooq.util.");
+ sb.append(db.getDialect().getName().toLowerCase());
+ sb.append(".");
+ sb.append(db.getDialect().getName());
+ sb.append("DataType.");
+ sb.append(FieldTypeHelper.normalise(FieldTypeHelper.getDataType(db.getDialect(), String.class).getTypeName()));
+ sb.append(".asEnumDataType(");
+ sb.append(strategy.getFullJavaClassName(db.getEnum(schema, u)));
+ sb.append(".class)");
+ }
+ else {
+ DataType> dataType = null;
+
+ try {
+ dataType = FieldTypeHelper.getDialectDataType(db.getDialect(), t, p, s);
+ }
+
+ // Mostly because of unsupported data types. Will be handled later.
+ catch (SQLDialectNotSupportedException ignore) {
+ }
+
+ // If there is a standard SQLDataType available for the dialect-
+ // specific DataType t, then reference that one.
+ if (dataType != null && dataType.getSQLDataType() != null) {
+ SQLDataType> sqlDataType = dataType.getSQLDataType();
+
+ sb.append(SQLDataType.class.getCanonicalName());
+ sb.append(".");
+ sb.append(FieldTypeHelper.normalise(sqlDataType.getTypeName()));
+
+ if (db.getConfiguredCustomType(u) != null) {
+ sb.append(".asConvertedDataType(new ");
+ sb.append(db.getConfiguredCustomType(u).getConverter());
+ sb.append("())");
+ }
+ }
+
+ // Otherwise, reference the dialect-specific DataType itself.
+ else {
+ sb.append("org.jooq.util.");
+ sb.append(db.getDialect().getName().toLowerCase());
+ sb.append(".");
+ sb.append(db.getDialect().getName());
+ sb.append("DataType.");
+
+ try {
+ String type1 = getType(db, schema, t, p, s, u, null);
+ String type2 = getType(db, schema, t, 0, 0, u, null);
+
+ sb.append(FieldTypeHelper.normalise(t));
+
+ if (!type1.equals(type2)) {
+ Class> clazz = FieldTypeHelper.getDialectJavaType(db.getDialect(), t, p, s);
+
+ sb.append(".asNumberDataType(");
+ sb.append(clazz.getCanonicalName());
+ sb.append(".class)");
+ }
+ }
+
+ // Mostly because of unsupported data types
+ catch (SQLDialectNotSupportedException e) {
+ sb.append("getDefaultDataType(\"");
+ sb.append(t);
+ sb.append("\")");
+ }
+ }
+ }
+
+ return sb.toString();
+ }
+
+ private boolean match(DataTypeDefinition type1, DataTypeDefinition type2) throws SQLException {
+ return getJavaType(type1).equals(getJavaType(type2));
+ }
+}
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java
new file mode 100644
index 00000000000..ab95d405cba
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.util;
+
+import static org.jooq.util.GenerationUtil.convertToJavaIdentifier;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jooq.tools.StringUtils;
+
+/**
+ * The default naming strategy for the {@link DefaultGenerator}
+ *
+ * @author Lukas Eder
+ */
+public class DefaultGeneratorStrategy extends AbstractGeneratorStrategy {
+
+ private String targetDirectory;
+ private String targetPackage;
+ private boolean instanceFields;
+
+ // -------------------------------------------------------------------------
+ // Initialisation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public final void setInstanceFields(boolean instanceFields) {
+ this.instanceFields = instanceFields;
+ }
+
+ @Override
+ public final boolean getInstanceFields() {
+ return instanceFields;
+ }
+
+ @Override
+ public final String getTargetDirectory() {
+ return targetDirectory;
+ }
+
+ @Override
+ public final void setTargetDirectory(String directory) {
+ this.targetDirectory = directory;
+ }
+
+ @Override
+ public final String getTargetPackage() {
+ return targetPackage;
+ }
+
+ @Override
+ public final void setTargetPackage(String packageName) {
+ this.targetPackage = packageName;
+ }
+
+ // -------------------------------------------------------------------------
+ // Strategy methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String getJavaIdentifier(Definition definition) {
+ return GenerationUtil.convertToJavaIdentifier(definition.getOutputName().toUpperCase());
+ }
+
+ @Override
+ public String getJavaSetterName(Definition definition, Mode mode) {
+ return "set" + getJavaClassName0(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public String getJavaGetterName(Definition definition, Mode mode) {
+ return "get" + getJavaClassName0(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public String getJavaMethodName(Definition definition, Mode mode) {
+ return getJavaClassName0LC(definition, Mode.DEFAULT);
+ }
+
+ @Override
+ public String getJavaClassExtends(Definition definition, Mode mode) {
+ return null;
+ }
+
+ @Override
+ public List getJavaClassImplements(Definition definition, Mode mode) {
+ List result = new ArrayList();
+
+ if (mode == Mode.POJO) {
+ result.add(Serializable.class.getName());
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getJavaClassName(Definition definition, Mode mode) {
+ return getJavaClassName0(definition, mode);
+ }
+
+ @Override
+ public String getJavaPackageName(Definition definition, Mode mode) {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append(getTargetPackage());
+
+ // [#282] In multi-schema setups, the schema name goes into the package
+ if (definition.getDatabase().getSchemata().size() > 1) {
+ sb.append(".");
+ sb.append(convertToJavaIdentifier(definition.getSchema().getOutputName()).toLowerCase());
+ }
+
+ // Some definitions have their dedicated subpackages, e.g. "tables", "routines"
+ if (!StringUtils.isBlank(getSubPackage(definition))) {
+ sb.append(".");
+ sb.append(getSubPackage(definition));
+ }
+
+ // Record are yet in another subpackage
+ if (mode == Mode.RECORD) {
+ sb.append(".records");
+ }
+
+ // POJOs too
+ else if (mode == Mode.POJO) {
+ sb.append(".pojos");
+ }
+
+ return sb.toString();
+ }
+
+ @Override
+ public String getJavaMemberName(Definition definition, Mode mode) {
+ return getJavaClassName0LC(definition, mode);
+ }
+
+ private String getJavaClassName0LC(Definition definition, Mode mode) {
+ String result = getJavaClassName0(definition, mode);
+ return result.substring(0, 1).toLowerCase() + result.substring(1);
+ }
+
+ private String getJavaClassName0(Definition definition, Mode mode) {
+ StringBuilder result = new StringBuilder();
+
+ String name = GenerationUtil.convertToJavaIdentifier(definition.getOutputName());
+ result.append(StringUtils.toCamelCase(name));
+
+ if (mode == Mode.RECORD) {
+ result.append("Record");
+ }
+ else if (mode == Mode.FACTORY) {
+ result.append("Factory");
+ }
+
+ if (!StringUtils.isBlank(definition.getOverload())) {
+ result.append(definition.getOverload());
+ }
+
+ return result.toString();
+ }
+
+ private final String getSubPackage(Definition definition) {
+ if (definition instanceof MasterDataTableDefinition) {
+ return "enums";
+ }
+ else if (definition instanceof TableDefinition) {
+ return "tables";
+ }
+
+ // [#799] UDT's are also packages
+ else if (definition instanceof UDTDefinition) {
+ return "udt";
+ }
+ else if (definition instanceof PackageDefinition) {
+ return "packages";
+ }
+ else if (definition instanceof RoutineDefinition) {
+ RoutineDefinition routine = (RoutineDefinition) definition;
+
+ if (routine.getPackage() instanceof UDTDefinition) {
+ return "udt." + getJavaIdentifier(routine.getPackage()).toLowerCase();
+ }
+ else if (routine.getPackage() != null) {
+ return "packages." + getJavaIdentifier(routine.getPackage()).toLowerCase();
+ }
+ else {
+ return "routines";
+ }
+ }
+ else if (definition instanceof EnumDefinition) {
+ return "enums";
+ }
+ else if (definition instanceof ArrayDefinition) {
+ return "udt";
+ }
+
+ // Default always to the main package
+ return "";
+ }
+}
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTask.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTask.java
new file mode 100644
index 00000000000..56b8af00bfd
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTask.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jooq.util;
+
+import java.util.Properties;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ * Class generation facility that can be invoked from ant.
+ *
+ * @author Lukas Eder
+ */
+public class GenerationTask extends Task {
+
+ private Properties properties = new Properties();
+
+ {
+ // Set default values
+ properties.setProperty("jdbc.Driver", "com.mysql.jdbc.Driver");
+
+ properties.setProperty("generator", "org.jooq.util.DefaultGenerator");
+ properties.setProperty("generator.database", "org.jooq.util.mysql.MySQLDatabase");
+ properties.setProperty("generator.database.includes", ".*");
+ properties.setProperty("generator.database.excludes", "");
+ properties.setProperty("generator.generate.records", "true");
+ properties.setProperty("generator.generate.relations", "false");
+ properties.setProperty("generator.generate.instance-fields", "true");
+ properties.setProperty("generator.generate.generated-annotation", "true");
+ properties.setProperty("generator.generate.unsigned-types", "true");
+
+ properties.setProperty("generator.target.directory", ".");
+ }
+
+ public void setJdbcdriver(String value) {
+ properties.setProperty("jdbc.Driver", value);
+ }
+
+ public void setJdbcurl(String value) {
+ properties.setProperty("jdbc.URL", value);
+ }
+
+ public void setJdbcschema(String value) {
+ properties.setProperty("jdbc.Schema", value);
+ }
+
+ public void setJdbcuser(String value) {
+ properties.setProperty("jdbc.User", value);
+ }
+
+ public void setJdbcpassword(String value) {
+ properties.setProperty("jdbc.Password", value);
+ }
+
+ public void setGenerator(String value) {
+ properties.setProperty("generator", value);
+ }
+
+ public void setGeneratordatabase(String value) {
+ properties.setProperty("generator.database", value);
+ }
+
+ public void setGeneratordatabaseincludes(String value) {
+ properties.setProperty("generator.database.includes", value);
+ }
+
+ public void setGeneratordatabaseexcludes(String value) {
+ properties.setProperty("generator.database.excludes", value);
+ }
+
+ public void setGeneratordatabaseinputschema(String value) {
+ properties.setProperty("generator.database.input-schema", value);
+ }
+
+ public void setGeneratordatabaseoutputschema(String value) {
+ properties.setProperty("generator.database.output-schema", value);
+ }
+
+ public void setGeneratorgeneraterecords(String value) {
+ properties.setProperty("generator.generate.records", value);
+ }
+
+ public void setGeneratorgeneraterelations(String value) {
+ properties.setProperty("generator.generate.relations", value);
+ }
+
+ public void setGeneratorgenerateinstancefields(String value) {
+ properties.setProperty("generator.generate.instance-fields", value);
+ }
+
+ public void setGeneratorgenerateunsignedtypes(String value) {
+ properties.setProperty("generator.generate.unsigned-types", value);
+ }
+
+ public void setGeneratorgenerategeneratedannotation(String value) {
+ properties.setProperty("generator.generate.generated-annotation", value);
+ }
+
+ public void setGeneratortargetpackage(String value) {
+ properties.setProperty("generator.target.package", value);
+ }
+
+ public void setGeneratortargetdirectory(String value) {
+ properties.setProperty("generator.target.directory", value);
+ }
+
+ @Override
+ public void execute() throws BuildException {
+ try {
+ GenerationTool.main(properties);
+ } catch (Exception e) {
+ throw new BuildException(e);
+ }
+ }
+}
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java
new file mode 100644
index 00000000000..1f97d02b54d
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java
@@ -0,0 +1,426 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jooq.util;
+
+import static org.jooq.tools.StringUtils.defaultString;
+import static org.jooq.tools.StringUtils.isBlank;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.StringReader;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import javax.xml.bind.JAXB;
+
+import org.jooq.tools.JooqLogger;
+import org.jooq.tools.StringUtils;
+import org.jooq.util.jaxb.Configuration;
+import org.jooq.util.jaxb.EnumType;
+import org.jooq.util.jaxb.ForcedType;
+import org.jooq.util.jaxb.Generate;
+import org.jooq.util.jaxb.Jdbc;
+import org.jooq.util.jaxb.MasterDataTable;
+import org.jooq.util.jaxb.Property;
+import org.jooq.util.jaxb.Schema;
+import org.jooq.util.jaxb.Strategy;
+import org.jooq.util.jaxb.Target;
+
+/**
+ * The GenerationTool takes care of generating Java code from a database schema. It
+ * takes its configuration parameters from a standard Java properties file,
+ * using this format:
+ *
+ *
+ *
+ *
jdbcDriver = [the JDBC driver to connect with. Make sure it is on the
+ * classpath]
+ *
jdbcURL = [the JDBC URL to connect with]
+ *
jdbcUser = [the JDBC user to connect with]
+ *
jdbcPassword = [the JDBC password to connect with]
+ *
+ *
+ *
+ * @author Lukas Eder
+ */
+public class GenerationTool {
+
+ private static final JooqLogger log = JooqLogger.getLogger(GenerationTool.class);
+
+ /**
+ * @param args
+ * @throws Exception
+ */
+ public static void main(String[] args) throws Exception {
+ if (args.length < 1) {
+ error();
+ }
+
+ InputStream in = GenerationTool.class.getResourceAsStream(args[0]);
+
+ if (in == null) {
+ log.error("Cannot find " + args[0]);
+ log.error("-----------");
+ log.error("Please be sure it is located on the classpath and qualified as a classpath location.");
+ log.error("If it is located at the current working directory, try adding a '/' to the path");
+ error();
+ }
+
+ log.info("Initialising properties", args[0]);
+
+ try {
+ if (args[0].endsWith(".xml")) {
+
+ // [#1149] If there is no namespace defined, add the default one
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ copyLarge(in, out);
+ String xml = out.toString();
+
+ // TODO [#1201] Add better error handling here
+ xml = xml.replaceAll(
+ "",
+ "");
+
+ xml = xml.replace(
+ "",
+ "");
+
+ main(JAXB.unmarshal(new StringReader(xml), Configuration.class));
+ }
+ else {
+ Properties properties = new Properties();
+ properties.load(in);
+ main(properties, args);
+ }
+ } catch (Exception e) {
+ log.error("Cannot read " + args[0] + ". Error : " + e.getMessage());
+ e.printStackTrace();
+ error();
+ } finally {
+ if (in != null) {
+ in.close();
+ }
+ }
+ }
+
+ public static void main(Properties properties, String... args) throws Exception {
+ Jdbc jdbc = new Jdbc();
+ jdbc.setDriver(properties.getProperty("jdbc.Driver"));
+ jdbc.setUrl(properties.getProperty("jdbc.URL"));
+ jdbc.setUser(properties.getProperty("jdbc.User"));
+ jdbc.setPassword(properties.getProperty("jdbc.Password"));
+ jdbc.setSchema(properties.getProperty("jdbc.Schema"));
+
+ Strategy strategy = new Strategy();
+ strategy.setName(properties.containsKey("generator.strategy") ? properties.getProperty("generator.strategy") : null);
+
+ List masterDataTables = new ArrayList();
+ for (String name : defaultString(properties.getProperty("generator.generate.master-data-tables")).split(",")) {
+ if (isBlank(name)) continue;
+
+ MasterDataTable table = new MasterDataTable();
+
+ table.setName(name);
+ table.setLiteral(properties.getProperty("generator.generate.master-data-table-literal." + name));
+ table.setDescription(properties.getProperty("generator.generate.master-data-table-description." + name));
+
+ masterDataTables.add(table);
+ }
+
+ List enumTypes = new ArrayList();
+ for (String property : properties.stringPropertyNames()) {
+ if (property.startsWith("generator.database.enum-type.")) {
+ String name = property.replace("generator.database.enum-type.", "");
+
+ EnumType type = new EnumType();
+ type.setName(name);
+ type.setLiterals(properties.getProperty(property));
+ enumTypes.add(type);
+ }
+ }
+
+ List forcedTypes = new ArrayList();
+ for (String property : properties.stringPropertyNames()) {
+ if (property.startsWith("generator.database.forced-type.")) {
+ String name = property.replace("generator.database.forced-type.", "");
+
+ ForcedType type = new ForcedType();
+ type.setName(name);
+ type.setExpressions(properties.getProperty(property));
+ forcedTypes.add(type);
+ }
+ }
+
+ org.jooq.util.jaxb.Database database = new org.jooq.util.jaxb.Database();
+ database.setName(properties.getProperty("generator.database"));
+ database.setIncludes(properties.containsKey("generator.database.includes") ? properties.getProperty("generator.database.includes") : null);
+ database.setExcludes(properties.containsKey("generator.database.excludes") ? properties.getProperty("generator.database.excludes") : null);
+ database.setDateAsTimestamp("true".equalsIgnoreCase(properties.getProperty("generator.database.date-as-timestamp")));
+ database.setUnsignedTypes(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.unsigned-types")));
+ database.setInputSchema(properties.containsKey("generator.database.input-schema") ? properties.getProperty("generator.database.input-schema") : null);
+ database.setOutputSchema(properties.containsKey("generator.database.output-schema") ? properties.getProperty("generator.database.output-schema") : null);
+
+ // Avoid creating these empty elements when migrating
+ if (!masterDataTables.isEmpty())
+ database.getMasterDataTables().addAll(masterDataTables);
+
+ if (!enumTypes.isEmpty())
+ database.getEnumTypes().addAll(enumTypes);
+
+ if (!forcedTypes.isEmpty())
+ database.getForcedTypes().addAll(forcedTypes);
+
+ Target target = new Target();
+ target.setPackageName(properties.getProperty("generator.target.package"));
+ target.setDirectory(properties.getProperty("generator.target.directory"));
+
+ Generate generate = new Generate();
+ generate.setRelations("true".equalsIgnoreCase(properties.getProperty("generator.generate.relations")));
+ generate.setDeprecated(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.deprecated")));
+ generate.setInstanceFields(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.instance-fields")));
+ generate.setGeneratedAnnotation(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.generated-annotation")));
+ generate.setPojos("true".equalsIgnoreCase(properties.getProperty("generator.generate.pojos")));
+ generate.setRecords(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.records")));
+ generate.setJpaAnnotations("true".equalsIgnoreCase(properties.getProperty("generator.generate.jpa-annotations")));
+
+ org.jooq.util.jaxb.Generator generator = new org.jooq.util.jaxb.Generator();
+
+ if (!isBlank(strategy.getName()))
+ generator.setStrategy(strategy);
+
+ generator.setDatabase(database);
+ generator.setTarget(target);
+ generator.setGenerate(generate);
+ generator.setName(properties.containsKey("generator") ? properties.getProperty("generator") : null);
+
+ Configuration configuration = new Configuration();
+ configuration.setJdbc(jdbc);
+ configuration.setGenerator(generator);
+
+ if (args.length < 2) {
+ log.warn("WARNING: jooq-codegen source code generation using .properties files is deprecated as of jOOQ 2.0.4");
+ log.info(" Consider using XML configuration instead");
+ log.info(" See http://www.jooq.org/manual/META/Configuration/ for more details");
+ log.info("");
+ log.info("Use GenerationTool to migrate your .properties file to XML (printed on System.out) :");
+ log.info("Usage : GenerationTool migrate");
+ log.info("");
+ log.info("XML output:");
+ log.info("");
+ JAXB.marshal(configuration, System.out);
+ log.info("");
+ log.info("");
+
+ main(configuration);
+ }
+ else if ("migrate".equals(args[1])) {
+ log.info("Migrating properties to XML");
+ JAXB.marshal(configuration, System.out);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static void main(Configuration configuration) throws Exception {
+ Jdbc j = configuration.getJdbc();
+ org.jooq.util.jaxb.Generator g = configuration.getGenerator();
+
+ // Some default values for optional elements to avoid NPE's
+ if (g.getStrategy() == null)
+ g.setStrategy(new Strategy());
+ if (g.getTarget() == null)
+ g.setTarget(new Target());
+
+ Class.forName(j.getDriver());
+ Connection connection = null;
+
+ try {
+
+ // Initialise connection
+ // ---------------------
+ Properties properties = new Properties();
+ for (Property p : j.getProperties()) {
+ properties.put(p.getKey(), p.getValue());
+ }
+
+ if (!properties.containsKey("user"))
+ properties.put("user", defaultString(j.getUser()));
+ if (!properties.containsKey("password"))
+ properties.put("password", defaultString(j.getPassword()));
+
+ connection = DriverManager.getConnection(defaultString(j.getUrl()), properties);
+
+ // Initialise generator
+ // --------------------
+ Class generatorClass = (Class) (!isBlank(g.getName())
+ ? Class.forName(trim(g.getName()))
+ : DefaultGenerator.class);
+ Generator generator = generatorClass.newInstance();
+
+ Class strategyClass = (Class) (!isBlank(g.getStrategy().getName())
+ ? Class.forName(trim(g.getStrategy().getName()))
+ : DefaultGeneratorStrategy.class);
+ GeneratorStrategy strategy = strategyClass.newInstance();
+
+ generator.setStrategy(strategy);
+
+ Class databaseClass = (Class) Class.forName(trim(g.getDatabase().getName()));
+ Database database = databaseClass.newInstance();
+
+ List schemata = g.getDatabase().getSchemata();
+ if (schemata.isEmpty()) {
+ Schema schema = new Schema();
+ schema.setInputSchema(trim(g.getDatabase().getInputSchema()));
+ schema.setOutputSchema(trim(g.getDatabase().getOutputSchema()));
+ schemata.add(schema);
+ }
+ else {
+ if (!StringUtils.isBlank(g.getDatabase().getInputSchema())) {
+ log.warn("WARNING: Cannot combine configuration properties /configuration/generator/database/inputSchema and /configuration/generator/database/schemata");
+ }
+ if (!StringUtils.isBlank(g.getDatabase().getOutputSchema())) {
+ log.warn("WARNING: Cannot combine configuration properties /configuration/generator/database/outputSchema and /configuration/generator/database/schemata");
+ }
+ }
+
+ for (Schema schema : schemata) {
+ if (StringUtils.isBlank(schema.getInputSchema())) {
+ log.warn("WARNING: The configuration property jdbc.Schema is deprecated and will be removed in the future. Use /configuration/generator/database/inputSchema instead");
+ schema.setInputSchema(trim(j.getSchema()));
+ }
+
+ if (StringUtils.isBlank(schema.getOutputSchema())) {
+ schema.setOutputSchema(trim(schema.getInputSchema()));
+ }
+ }
+
+ database.setConnection(connection);
+ database.setConfiguredSchemata(schemata);
+ database.setIncludes(defaultString(g.getDatabase().getIncludes()).split(","));
+ database.setExcludes(defaultString(g.getDatabase().getExcludes()).split(","));
+ database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables());
+ database.setConfiguredCustomTypes(g.getDatabase().getCustomTypes());
+ database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes());
+ database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes());
+
+ if (g.getDatabase().getEnumTypes().size() > 0) {
+ log.warn("WARNING: The configuration property /configuration/generator/database/enumTypes is experimental and deprecated and will be removed in the future.");
+ }
+
+ if (g.getDatabase().isDateAsTimestamp() != null)
+ database.setDateAsTimestamp(g.getDatabase().isDateAsTimestamp());
+ if (g.getDatabase().isUnsignedTypes() != null)
+ database.setSupportsUnsignedTypes(g.getDatabase().isUnsignedTypes());
+
+ if (StringUtils.isBlank(g.getTarget().getPackageName()))
+ g.getTarget().setPackageName("org.jooq.generated");
+ if (StringUtils.isBlank(g.getTarget().getDirectory()))
+ g.getTarget().setPackageName("target/generated-sources/jooq");
+
+ generator.setTargetPackage(g.getTarget().getPackageName());
+ generator.setTargetDirectory(g.getTarget().getDirectory());
+
+ if (g.getGenerate().isRelations() != null)
+ generator.setGenerateRelations(g.getGenerate().isRelations());
+ if (g.getGenerate().isNavigationMethods() != null)
+ generator.setGenerateNavigationMethods(g.getGenerate().isNavigationMethods());
+ if (g.getGenerate().isDeprecated() != null)
+ generator.setGenerateDeprecated(g.getGenerate().isDeprecated());
+ if (g.getGenerate().isInstanceFields() != null)
+ generator.setGenerateInstanceFields(g.getGenerate().isInstanceFields());
+ if (g.getGenerate().isGeneratedAnnotation() != null)
+ generator.setGenerateGeneratedAnnotation(g.getGenerate().isGeneratedAnnotation());
+ if (g.getGenerate().isPojos() != null)
+ generator.setGeneratePojos(g.getGenerate().isPojos());
+ if (g.getGenerate().isRecords() != null)
+ generator.setGenerateRecords(g.getGenerate().isRecords());
+ if (g.getGenerate().isJpaAnnotations() != null)
+ generator.setGenerateJPAAnnotations(g.getGenerate().isJpaAnnotations());
+
+ // Generator properties that should in fact be strategy properties
+ strategy.setInstanceFields(generator.generateInstanceFields());
+
+
+ generator.generate(database);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
+ } finally {
+ if (connection != null) {
+ connection.close();
+ }
+ }
+ }
+
+ private static String trim(String string) {
+ return (string == null ? null : string.trim());
+ }
+
+ private static void error() {
+ log.error("Usage : GenerationTool ");
+ System.exit(-1);
+ }
+
+ /**
+ * 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.
+ *
+ * @param input the InputStream to read from
+ * @param output the OutputStream to write to
+ * @return the number of bytes copied
+ * @throws NullPointerException if the input or output is null
+ * @throws IOException if an I/O error occurs
+ * @since Commons IO 1.3
+ */
+ public static long copyLarge(InputStream input, OutputStream output) throws IOException {
+ byte[] buffer = new byte[1024 * 4];
+ long count = 0;
+ int n = 0;
+ while (-1 != (n = input.read(buffer))) {
+ output.write(buffer, 0, n);
+ count += n;
+ }
+ return count;
+ }
+}
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationUtil.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationUtil.java
new file mode 100644
index 00000000000..cf16c7a758d
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationUtil.java
@@ -0,0 +1,197 @@
+/**
+ * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
+ * All rights reserved.
+ *
+ * This software is licensed to you under the Apache License, Version 2.0
+ * (the "License"); You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name "jOOQ" nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.jooq.util;
+
+import static java.util.Arrays.asList;
+import static java.util.Collections.unmodifiableSet;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jooq.SQLDialect;
+import org.jooq.exception.SQLDialectNotSupportedException;
+import org.jooq.util.h2.H2DataType;
+
+/**
+ * @author Lukas Eder
+ */
+class GenerationUtil {
+
+ private static Set JAVA_KEYWORDS = unmodifiableSet(new HashSet(asList(
+ "abstract",
+ "assert",
+ "boolean",
+ "break",
+ "byte",
+ "case",
+ "catch",
+ "char",
+ "class",
+ "const",
+ "continue",
+ "default",
+ "double",
+ "do",
+ "else",
+ "enum",
+ "extends",
+ "false",
+ "final",
+ "finally",
+ "float",
+ "for",
+ "goto",
+ "if",
+ "implements",
+ "import",
+ "instanceof",
+ "interface",
+ "int",
+ "long",
+ "native",
+ "new",
+ "package",
+ "private",
+ "protected",
+ "public",
+ "return",
+ "short",
+ "static",
+ "strictfp",
+ "super",
+ "switch",
+ "synchronized",
+ "this",
+ "throw",
+ "throws",
+ "transient",
+ "true",
+ "try",
+ "void",
+ "volatile",
+ "while")));
+
+ /**
+ * Take a literal (e.g. database column) and make it a Java identifier to be
+ * used without case-change as an enum identifier
+ *
+ * [#959] These literals are escaped if they collide with reserved words.
+ * This implementation is meant as a fix for [#959]. These types of
+ * collisions have to be generally reviewed again, when allowing for more
+ * control over generated source code, as of [#408][#911]
+ */
+ static String convertToJavaIdentifier(String literal) {
+ if (JAVA_KEYWORDS.contains(literal)) {
+ return literal + "_";
+ }
+
+ StringBuilder sb = new StringBuilder();
+
+ if ("".equals(literal)) {
+ return "_";
+ }
+
+ if (!Character.isJavaIdentifierStart(literal.charAt(0))) {
+ sb.append("_");
+ }
+
+ for (int i = 0; i < literal.length(); i++) {
+ char c = literal.charAt(i);
+
+ if (!Character.isJavaIdentifierPart(c)) {
+ sb.append("_");
+ }
+ else {
+ sb.append(c);
+ }
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * Take a qualified Java type and make it a simple type
+ *
+ * @see Class#getSimpleName()
+ */
+ static String getSimpleJavaType(String qualifiedJavaType) {
+ if (qualifiedJavaType == null) {
+ return null;
+ }
+
+ return qualifiedJavaType.replaceAll(".*\\.", "");
+ }
+
+ /**
+ * Gets the base type for an array type, depending on the RDBMS dialect
+ */
+ static String getArrayBaseType(SQLDialect dialect, String t, String u) {
+ switch (dialect) {
+ case POSTGRES: {
+
+ // The convention is to prepend a "_" to a type to get an array type
+ if (u != null && u.startsWith("_")) {
+ return u.substring(1);
+ }
+
+ // But there are also arrays with a "vector" suffix
+ else {
+ return u;
+ }
+ }
+
+ case H2: {
+ return H2DataType.OTHER.getTypeName();
+ }
+
+ case HSQLDB: {
+
+ // In HSQLDB 2.2.5, there has been an incompatible INFORMATION_SCHEMA change around the
+ // ELEMENT_TYPES view. Arrays are now described much more explicitly
+ if ("ARRAY".equalsIgnoreCase(t)) {
+ return "OTHER";
+ }
+
+ // This is for backwards compatibility
+ else {
+ return t.replace(" ARRAY", "");
+ }
+ }
+ }
+
+ throw new SQLDialectNotSupportedException("getArrayBaseType() is not supported for dialect " + dialect);
+ }
+}
\ No newline at end of file
diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationWriter.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationWriter.java
new file mode 100644
index 00000000000..ab7a57daed8
--- /dev/null
+++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationWriter.java
@@ -0,0 +1,262 @@
+package org.jooq.util;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+
+import org.jooq.tools.StringUtils;
+
+/**
+ * A wrapper for a {@link PrintWriter}
+ *
+ * This wrapper postpones the actual write to the wrapped {@link PrintWriter}
+ * until all information about the target Java class is available. This way, the
+ * import dependencies can be calculated at the end.
+ *
+ * @author Lukas Eder
+ */
+public class GenerationWriter {
+
+ private static final String SUPPRESS_WARNINGS_STATEMENT = "__SUPPRESS_WARNINGS_STATEMENT__";
+ private static final String STATIC_INITIALISATION_STATEMENT = "__STATIC_INITIALISATION_STATEMENT__";
+ private static final String INITIALISATION_STATEMENT = "__INITIALISATION_STATEMENT__";
+ private static final String SERIAL_STATEMENT = "__SERIAL_STATEMENT__";
+
+ private final PrintWriter writer;
+ private final StringBuilder sb;
+ private final List staticInitialisationStatements;
+ private final List initialisationStatements;
+ private final Set