diff --git a/jOOQ-codegen-maven-example/pom.xml b/jOOQ-codegen-maven-example/pom.xml index 246cad959f..12eb451b3d 100644 --- a/jOOQ-codegen-maven-example/pom.xml +++ b/jOOQ-codegen-maven-example/pom.xml @@ -83,6 +83,13 @@ jar test + + javax.persistence + persistence-api + 1.0.2 + jar + true + @@ -126,6 +133,7 @@ true false false + true org.jooq.util.maven.example.postgres @@ -161,6 +169,7 @@ true false true + true org.jooq.util.maven.example.ase @@ -188,6 +197,7 @@ org.jooq.util.mysql.MySQLDatabase .* t_book_details + true test @@ -262,6 +272,8 @@ false true false + true + true org.jooq.util.maven.example.mysql diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Database.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Database.java deleted file mode 100644 index 2bd9a3c781..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Database.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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.util.List; - -/** - * @author Sander Plas - * @author Lukas Eder - */ -public class Database { - - private String name; - private String includes = ""; - private String excludes = ""; - private String inputSchema; - private String outputSchema; - private String dateAsTimestamp = "false"; - private String unsignedTypes = "true"; - private List enumTypes; - private List forcedTypes; - - String getName() { - return name; - } - - String getIncludes() { - return includes; - } - - String getExcludes() { - return excludes; - } - - String getInputSchema() { - return inputSchema; - } - - String getOutputSchema() { - return outputSchema; - } - - String getDateAsTimestamp() { - return dateAsTimestamp; - } - - String getUnsignedTypes() { - return unsignedTypes; - } - - List getEnumTypes() { - return enumTypes; - } - - List getForcedTypes() { - return forcedTypes; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/EnumType.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/EnumType.java deleted file mode 100644 index 69fc7e3055..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/EnumType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Lukas Eder - */ -public class EnumType { - - private String name; - private String literals; - - String getName() { - return name; - } - - String getLiterals() { - return literals; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/ForcedType.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/ForcedType.java deleted file mode 100644 index 17821763c4..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/ForcedType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Lukas Eder - */ -public class ForcedType { - - private String name; - private String expressions; - - String getName() { - return name; - } - - String getExpressions() { - return expressions; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generate.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generate.java deleted file mode 100644 index 558cd3fe77..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generate.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Sander Plas - */ -public class Generate { - - private String relations = "false"; - private String deprecated = "true"; - private String instanceFields = "true"; - private String generatedAnnotation = "true"; - private String pojos = "false"; - private String jpaAnnotations = "false"; - - String getRelations() { - return relations; - } - - String getDeprecated() { - return deprecated; - } - - String getInstanceFields() { - return instanceFields; - } - - String getGeneratedAnnotation() { - return generatedAnnotation; - } - - String getPojos() { - return pojos; - } - - String getJPAAnnotations() { - return jpaAnnotations; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generator.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generator.java deleted file mode 100644 index f97fd1f351..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Generator.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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.util.List; - -import org.jooq.util.DefaultGenerator; - -/** - * @author Sander Plas - */ -public class Generator { - - private String name = DefaultGenerator.class.getName(); - private Strategy strategy; - private Database database; - private Generate generate; - private List masterDataTables; - private Target target; - - String getName() { - return name; - } - - Strategy getStrategy() { - return strategy; - } - - Database getDatabase() { - return database; - } - - Generate getGenerate() { - return generate; - } - - List getMasterDataTables() { - return masterDataTables; - } - - Target getTarget() { - return target; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Jdbc.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Jdbc.java deleted file mode 100644 index 10f3a5ab40..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Jdbc.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Sander Plas - */ -public class Jdbc { - - private String driver; - private String url; - private String schema = ""; - private String user = ""; - private String password = ""; - - String getDriver() { - return driver; - } - - String getUrl() { - return url; - } - - String getSchema() { - return schema; - } - - String getUser() { - return user; - } - - String getPassword() { - return password; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/MasterDataTable.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/MasterDataTable.java deleted file mode 100644 index 27a047b28d..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/MasterDataTable.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Sander Plas - */ -public class MasterDataTable { - - private String name; - private String literal; - private String description; - - String getName() { - return name; - } - - String getLiteral() { - return literal; - } - - String getDescription() { - return description; - } -} 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 index 6efe94fc32..91d8900162 100644 --- 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 @@ -35,13 +35,12 @@ */ package org.jooq.util.maven; -import static org.jooq.tools.StringUtils.defaultString; +import java.io.StringWriter; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.Properties; +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; @@ -62,91 +61,34 @@ public class Plugin extends AbstractMojo { * @required * @readonly */ - private MavenProject project; + private MavenProject project; /** * The jdbc settings. * * @parameter */ - private Jdbc jdbc; + private org.jooq.util.jaxb.Jdbc jdbc; /** * The generator settings * * @parameter */ - private Generator generator; + private org.jooq.util.jaxb.Generator generator; @Override public void execute() throws MojoExecutionException { - Properties props = new Properties(); - - props.put("jdbc.Driver", jdbc.getDriver()); - props.put("jdbc.URL", jdbc.getUrl()); - props.put("jdbc.Schema", defaultString(jdbc.getSchema())); - props.put("jdbc.User", defaultString(jdbc.getUser())); - props.put("jdbc.Password", defaultString(jdbc.getPassword())); - - props.put("generator", defaultString(generator.getName())); - props.put("generator.database", defaultString(generator.getDatabase().getName())); - props.put("generator.database.includes", defaultString(generator.getDatabase().getIncludes())); - props.put("generator.database.excludes", defaultString(generator.getDatabase().getExcludes())); - props.put("generator.database.input-schema", defaultString(generator.getDatabase().getInputSchema())); - props.put("generator.database.output-schema", defaultString(generator.getDatabase().getOutputSchema())); - props.put("generator.database.date-as-timestamp", defaultString(generator.getDatabase().getDateAsTimestamp())); - props.put("generator.generate.unsigned-types", defaultString(generator.getDatabase().getUnsignedTypes())); - - if (generator.getDatabase().getEnumTypes() != null) { - for (EnumType type : generator.getDatabase().getEnumTypes()) { - props.put("generator.database.enum-type." + type.getName(), type.getLiterals()); - } - } - if (generator.getDatabase().getForcedTypes() != null) { - for (ForcedType type : generator.getDatabase().getForcedTypes()) { - props.put("generator.database.forced-type." + type.getName(), type.getExpressions()); - } - } - - props.put("generator.generate.relations", defaultString(generator.getGenerate().getRelations())); - props.put("generator.generate.deprecated", defaultString(generator.getGenerate().getDeprecated())); - props.put("generator.generate.instance-fields", defaultString(generator.getGenerate().getInstanceFields())); - props.put("generator.generate.pojos", defaultString(generator.getGenerate().getPojos())); - props.put("generator.generate.jpa-annotations", defaultString(generator.getGenerate().getJPAAnnotations())); - - props.put("generator.target.package", generator.getTarget().getPackageName()); - props.put("generator.target.directory", generator.getTarget().getDirectory()); - - if (generator.getMasterDataTables() != null) { - - StringBuilder mdtList = new StringBuilder(); - for (MasterDataTable mdt : generator.getMasterDataTables()) { - if (mdtList.length() > 0) { - mdtList.append(","); - } - - mdtList.append(mdt.getName()); - - props.put("generator.generate.master-data-table-literal." + mdt.getName(), mdt.getLiteral()); - props.put("generator.generate.master-data-table-description." + mdt.getName(), mdt.getDescription()); - } - - props.put("generator.generate.master-data-tables", mdtList.toString()); - } - - if (getLog().isDebugEnabled()) { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - try { - props.store(stream, "passing these properties to jooq-codegen:"); - } - catch (IOException ex) { - throw new RuntimeException(ex); - } - getLog().debug(stream.toString()); - } - try { - GenerationTool.main(props); + 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); diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Strategy.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Strategy.java deleted file mode 100644 index ea3cadfffe..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Strategy.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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 org.jooq.util.DefaultGeneratorStrategy; - -/** - * @author Lukas Eder - */ -public class Strategy { - - private String name = DefaultGeneratorStrategy.class.getName(); - - String getName() { - return name; - } -} diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Target.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Target.java deleted file mode 100644 index 7036c28efd..0000000000 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Target.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2009-2011, 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; - -/** - * @author Sander Plas - */ -public class Target { - - private String packageName; - private String directory = "target/generated-sources/jooq"; - - String getPackageName() { - return packageName; - } - - String getDirectory() { - return directory; - } -} diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java index 7bc0ca9441..48db8fa646 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java @@ -42,6 +42,7 @@ import static org.jooq.tools.StringUtils.isBlank; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; +import java.util.ArrayList; import java.util.List; import java.util.Properties; @@ -50,16 +51,12 @@ 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.Database.EnumTypes; -import org.jooq.util.jaxb.Database.ForcedTypes; -import org.jooq.util.jaxb.Database.MasterDataTables; 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.Schemata; -import org.jooq.util.jaxb.Schemata.Schema; +import org.jooq.util.jaxb.Schema; import org.jooq.util.jaxb.Strategy; import org.jooq.util.jaxb.Target; @@ -135,7 +132,7 @@ public class GenerationTool { Strategy strategy = new Strategy(); strategy.setName(properties.containsKey("generator.strategy") ? properties.getProperty("generator.strategy") : null); - MasterDataTables masterDataTables = new MasterDataTables(); + List masterDataTables = new ArrayList(); for (String name : defaultString(properties.getProperty("generator.generate.master-data-tables")).split(",")) { if (isBlank(name)) continue; @@ -145,10 +142,10 @@ public class GenerationTool { table.setLiteral(properties.getProperty("generator.generate.master-data-table-literal." + name)); table.setDescription(properties.getProperty("generator.generate.master-data-table-description." + name)); - masterDataTables.getMasterDataTable().add(table); + masterDataTables.add(table); } - EnumTypes enumTypes = new EnumTypes(); + List enumTypes = new ArrayList(); for (String property : properties.stringPropertyNames()) { if (property.startsWith("generator.database.enum-type.")) { String name = property.replace("generator.database.enum-type.", ""); @@ -156,11 +153,11 @@ public class GenerationTool { EnumType type = new EnumType(); type.setName(name); type.setLiterals(properties.getProperty(property)); - enumTypes.getEnumType().add(type); + enumTypes.add(type); } } - ForcedTypes forcedTypes = new ForcedTypes(); + List forcedTypes = new ArrayList(); for (String property : properties.stringPropertyNames()) { if (property.startsWith("generator.database.forced-type.")) { String name = property.replace("generator.database.forced-type.", ""); @@ -168,34 +165,28 @@ public class GenerationTool { ForcedType type = new ForcedType(); type.setName(name); type.setExpressions(properties.getProperty(property)); - forcedTypes.getForcedType().add(type); + forcedTypes.add(type); } } - Schema schema = new Schema(); - schema.setInputSchema(properties.containsKey("generator.database.input-schema") ? properties.getProperty("generator.database.input-schema") : null); - schema.setOutputSchema(properties.containsKey("generator.database.output-schema") ? properties.getProperty("generator.database.output-schema") : null); - - Schemata schemata = new Schemata(); - schemata.getSchema().add(schema); - 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.setSchemata(schemata); + 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.getMasterDataTable().isEmpty()) - database.setMasterDataTables(masterDataTables); + if (!masterDataTables.isEmpty()) + database.getMasterDataTables().addAll(masterDataTables); - if (!enumTypes.getEnumType().isEmpty()) - database.setEnumTypes(enumTypes); + if (!enumTypes.isEmpty()) + database.getEnumTypes().addAll(enumTypes); - if (!forcedTypes.getForcedType().isEmpty()) - database.setForcedTypes(forcedTypes); + if (!forcedTypes.isEmpty()) + database.getForcedTypes().addAll(forcedTypes); Target target = new Target(); target.setPackageName(properties.getProperty("generator.target.package")); @@ -250,12 +241,6 @@ public class GenerationTool { g.setStrategy(new Strategy()); if (g.getTarget() == null) g.setTarget(new Target()); - if (g.getDatabase().getEnumTypes() == null) - g.getDatabase().setEnumTypes(new EnumTypes()); - if (g.getDatabase().getForcedTypes() == null) - g.getDatabase().setForcedTypes(new ForcedTypes()); - if (g.getDatabase().getMasterDataTables() == null) - g.getDatabase().setMasterDataTables(new MasterDataTables()); Class.forName(j.getDriver()); Connection connection = null; @@ -281,17 +266,23 @@ public class GenerationTool { Class databaseClass = (Class) Class.forName(g.getDatabase().getName()); Database database = databaseClass.newInstance(); - Schemata schemata = g.getDatabase().getSchemata(); - if (schemata == null) { - schemata = new Schemata(); - g.getDatabase().setSchemata(schemata); + List schemata = g.getDatabase().getSchemata(); + if (schemata.isEmpty()) { + Schema schema = new Schema(); + schema.setInputSchema(g.getDatabase().getInputSchema()); + schema.setOutputSchema(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"); + } } - List schemaList = schemata.getSchema(); - if (schemaList.isEmpty()) - schemaList.add(new Schema()); - - for (Schema schema : schemaList) { + 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(j.getSchema()); @@ -306,15 +297,20 @@ public class GenerationTool { database.setConfiguredSchemata(schemata); database.setIncludes(defaultString(g.getDatabase().getIncludes()).split(",")); database.setExcludes(defaultString(g.getDatabase().getExcludes()).split(",")); - database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables().getMasterDataTable()); - database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes().getEnumType()); - database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes().getForcedType()); + database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables()); + database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes()); + database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes()); 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()); diff --git a/jOOQ-meta/build.xml b/jOOQ-meta/build.xml index 99f81aab47..87aedb0260 100644 --- a/jOOQ-meta/build.xml +++ b/jOOQ-meta/build.xml @@ -14,6 +14,9 @@ - + + + + \ No newline at end of file diff --git a/jOOQ-meta/lib/activation.jar b/jOOQ-meta/lib/activation.jar new file mode 100644 index 0000000000..8cbef16f48 Binary files /dev/null and b/jOOQ-meta/lib/activation.jar differ diff --git a/jOOQ-meta/lib/jaxb-2.1.9.jar b/jOOQ-meta/lib/jaxb-2.1.9.jar deleted file mode 100644 index 1f60131227..0000000000 Binary files a/jOOQ-meta/lib/jaxb-2.1.9.jar and /dev/null differ diff --git a/jOOQ-meta/lib/jaxb-api.jar b/jOOQ-meta/lib/jaxb-api.jar new file mode 100644 index 0000000000..3918383710 Binary files /dev/null and b/jOOQ-meta/lib/jaxb-api.jar differ diff --git a/jOOQ-meta/lib/jaxb-impl-2.1.9.jar b/jOOQ-meta/lib/jaxb-impl-2.1.9.jar deleted file mode 100644 index 477a89c345..0000000000 Binary files a/jOOQ-meta/lib/jaxb-impl-2.1.9.jar and /dev/null differ diff --git a/jOOQ-meta/lib/jaxb-impl.jar b/jOOQ-meta/lib/jaxb-impl.jar new file mode 100644 index 0000000000..7ff2dac935 Binary files /dev/null and b/jOOQ-meta/lib/jaxb-impl.jar differ diff --git a/jOOQ-meta/lib/jaxb-xjc-2.1.9.jar b/jOOQ-meta/lib/jaxb-xjc.jar similarity index 65% rename from jOOQ-meta/lib/jaxb-xjc-2.1.9.jar rename to jOOQ-meta/lib/jaxb-xjc.jar index d2fefafa6f..e586232048 100644 Binary files a/jOOQ-meta/lib/jaxb-xjc-2.1.9.jar and b/jOOQ-meta/lib/jaxb-xjc.jar differ diff --git a/jOOQ-meta/lib/jaxb1-impl.jar b/jOOQ-meta/lib/jaxb1-impl.jar new file mode 100644 index 0000000000..f6c8349da4 Binary files /dev/null and b/jOOQ-meta/lib/jaxb1-impl.jar differ diff --git a/jOOQ-meta/lib/jsr173_1.0_api.jar b/jOOQ-meta/lib/jsr173_1.0_api.jar new file mode 100644 index 0000000000..87ff1c1abb Binary files /dev/null and b/jOOQ-meta/lib/jsr173_1.0_api.jar differ diff --git a/jOOQ-meta/lib/xew.jar b/jOOQ-meta/lib/xew.jar new file mode 100644 index 0000000000..a7e6051e97 Binary files /dev/null and b/jOOQ-meta/lib/xew.jar differ diff --git a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java index a19ce71a63..1c33a7b178 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java @@ -49,8 +49,7 @@ import org.jooq.tools.csv.CSVReader; import org.jooq.util.jaxb.EnumType; import org.jooq.util.jaxb.ForcedType; import org.jooq.util.jaxb.MasterDataTable; -import org.jooq.util.jaxb.Schemata; -import org.jooq.util.jaxb.Schemata.Schema; +import org.jooq.util.jaxb.Schema; /** * A base implementation for all types of databases. @@ -70,7 +69,7 @@ public abstract class AbstractDatabase implements Database { private String[] includes; private boolean supportsUnsignedTypes; private boolean dateAsTimestamp; - private Schemata configuredSchemata; + private List configuredSchemata; private List configuredMasterDataTables; private List configuredEnumTypes; private List configuredForcedTypes; @@ -135,7 +134,7 @@ public abstract class AbstractDatabase implements Database { public final List getInputSchemata() { List result = new ArrayList(); - for (Schema schema : configuredSchemata.getSchema()) { + for (Schema schema : configuredSchemata) { result.add(schema.getInputSchema()); } @@ -144,7 +143,7 @@ public abstract class AbstractDatabase implements Database { @Override public String getOutputSchema(String inputSchema) { - for (Schema schema : configuredSchemata.getSchema()) { + for (Schema schema : configuredSchemata) { if (inputSchema.equals(schema.getInputSchema())) { return schema.getOutputSchema(); } @@ -154,7 +153,7 @@ public abstract class AbstractDatabase implements Database { } @Override - public final void setConfiguredSchemata(Schemata schemata) { + public final void setConfiguredSchemata(List schemata) { this.configuredSchemata = schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/util/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/Database.java index 64068540cb..cc3d7e49ce 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/Database.java @@ -44,7 +44,7 @@ import org.jooq.impl.Factory; import org.jooq.util.jaxb.EnumType; import org.jooq.util.jaxb.ForcedType; import org.jooq.util.jaxb.MasterDataTable; -import org.jooq.util.jaxb.Schemata; +import org.jooq.util.jaxb.Schema; /** * A general database model. @@ -157,7 +157,7 @@ public interface Database { /** * The input and output schemata */ - void setConfiguredSchemata(Schemata schemata); + void setConfiguredSchemata(List schemata); /** * Only database objects matching any of these regular expressions will be diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java index c8adc12a49..d25e9a568b 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Configuration.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java index fe411c0b3c..0cfe5fc4de 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Database.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // @@ -13,6 +13,7 @@ import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlType; @@ -31,40 +32,12 @@ import javax.xml.bind.annotation.XmlType; * <element name="excludes" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="dateAsTimestamp" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * <element name="unsignedTypes" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> + * <element name="inputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * <element name="outputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="schemata" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Schemata" minOccurs="0"/> - * <element name="masterDataTables" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element name="enumTypes" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element name="forcedTypes" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> + * <element name="masterDataTables" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTables" minOccurs="0"/> + * <element name="enumTypes" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumTypes" minOccurs="0"/> + * <element name="forcedTypes" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedTypes" minOccurs="0"/> * </all> * </restriction> * </complexContent> @@ -89,10 +62,22 @@ public class Database { protected Boolean dateAsTimestamp; @XmlElement(defaultValue = "true") protected Boolean unsignedTypes; - protected Schemata schemata; - protected Database.MasterDataTables masterDataTables; - protected Database.EnumTypes enumTypes; - protected Database.ForcedTypes forcedTypes; + @XmlElement(defaultValue = "") + protected String inputSchema; + @XmlElement(defaultValue = "") + protected String outputSchema; + @XmlElementWrapper(name = "schemata") + @XmlElement(name = "schema") + protected List schemata; + @XmlElementWrapper(name = "masterDataTables") + @XmlElement(name = "masterDataTable") + protected List masterDataTables; + @XmlElementWrapper(name = "enumTypes") + @XmlElement(name = "enumType") + protected List enumTypes; + @XmlElementWrapper(name = "forcedTypes") + @XmlElement(name = "forcedType") + protected List forcedTypes; /** * Gets the value of the name property. @@ -215,276 +200,79 @@ public class Database { } /** - * Gets the value of the schemata property. + * Gets the value of the inputSchema property. * * @return * possible object is - * {@link Schemata } + * {@link String } * */ - public Schemata getSchemata() { + public String getInputSchema() { + return inputSchema; + } + + /** + * Sets the value of the inputSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInputSchema(String value) { + this.inputSchema = value; + } + + /** + * Gets the value of the outputSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOutputSchema() { + return outputSchema; + } + + /** + * Sets the value of the outputSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOutputSchema(String value) { + this.outputSchema = value; + } + + public List getSchemata() { + if (schemata == null) { + schemata = new ArrayList(); + } return schemata; } - /** - * Sets the value of the schemata property. - * - * @param value - * allowed object is - * {@link Schemata } - * - */ - public void setSchemata(Schemata value) { - this.schemata = value; - } - - /** - * Gets the value of the masterDataTables property. - * - * @return - * possible object is - * {@link Database.MasterDataTables } - * - */ - public Database.MasterDataTables getMasterDataTables() { + public List getMasterDataTables() { + if (masterDataTables == null) { + masterDataTables = new ArrayList(); + } return masterDataTables; } - /** - * Sets the value of the masterDataTables property. - * - * @param value - * allowed object is - * {@link Database.MasterDataTables } - * - */ - public void setMasterDataTables(Database.MasterDataTables value) { - this.masterDataTables = value; - } - - /** - * Gets the value of the enumTypes property. - * - * @return - * possible object is - * {@link Database.EnumTypes } - * - */ - public Database.EnumTypes getEnumTypes() { + public List getEnumTypes() { + if (enumTypes == null) { + enumTypes = new ArrayList(); + } return enumTypes; } - /** - * Sets the value of the enumTypes property. - * - * @param value - * allowed object is - * {@link Database.EnumTypes } - * - */ - public void setEnumTypes(Database.EnumTypes value) { - this.enumTypes = value; - } - - /** - * Gets the value of the forcedTypes property. - * - * @return - * possible object is - * {@link Database.ForcedTypes } - * - */ - public Database.ForcedTypes getForcedTypes() { + public List getForcedTypes() { + if (forcedTypes == null) { + forcedTypes = new ArrayList(); + } return forcedTypes; } - /** - * Sets the value of the forcedTypes property. - * - * @param value - * allowed object is - * {@link Database.ForcedTypes } - * - */ - public void setForcedTypes(Database.ForcedTypes value) { - this.forcedTypes = value; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "enumType" - }) - public static class EnumTypes { - - protected List enumType; - - /** - * Gets the value of the enumType property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the enumType property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getEnumType().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link EnumType } - * - * - */ - public List getEnumType() { - if (enumType == null) { - enumType = new ArrayList(); - } - return this.enumType; - } - - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "forcedType" - }) - public static class ForcedTypes { - - protected List forcedType; - - /** - * Gets the value of the forcedType property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the forcedType property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getForcedType().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link ForcedType } - * - * - */ - public List getForcedType() { - if (forcedType == null) { - forcedType = new ArrayList(); - } - return this.forcedType; - } - - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <sequence>
-     *         <element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
-     *       </sequence>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "masterDataTable" - }) - public static class MasterDataTables { - - protected List masterDataTable; - - /** - * Gets the value of the masterDataTable property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the masterDataTable property. - * - *

- * For example, to add a new item, do as follows: - *

-         *    getMasterDataTable().add(newItem);
-         * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link MasterDataTable } - * - * - */ - public List getMasterDataTable() { - if (masterDataTable == null) { - masterDataTable = new ArrayList(); - } - return this.masterDataTable; - } - - } - } diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java index 3ab9072853..c9e798ea02 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/EnumType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java index 06e09ea96e..8fc012c5a6 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ForcedType.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java index 8a82485626..fc542f44f6 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generate.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java index 0aae82672f..251bd472bf 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Generator.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java index 02cff91a7a..426485b626 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Jdbc.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java index afd16578b7..b8f6db3a8a 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/MasterDataTable.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java deleted file mode 100644 index b3f06cb24d..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/ObjectFactory.java +++ /dev/null @@ -1,159 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ -// - - -package org.jooq.util.jaxb; - -import javax.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the org.jooq.util.jaxb package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jooq.util.jaxb - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Target } - * - */ - public Target createTarget() { - return new Target(); - } - - /** - * Create an instance of {@link Generator } - * - */ - public Generator createGenerator() { - return new Generator(); - } - - /** - * Create an instance of {@link Strategy } - * - */ - public Strategy createStrategy() { - return new Strategy(); - } - - /** - * Create an instance of {@link Database.MasterDataTables } - * - */ - public Database.MasterDataTables createDatabaseMasterDataTables() { - return new Database.MasterDataTables(); - } - - /** - * Create an instance of {@link Configuration } - * - */ - public Configuration createConfiguration() { - return new Configuration(); - } - - /** - * Create an instance of {@link MasterDataTable } - * - */ - public MasterDataTable createMasterDataTable() { - return new MasterDataTable(); - } - - /** - * Create an instance of {@link EnumType } - * - */ - public EnumType createEnumType() { - return new EnumType(); - } - - /** - * Create an instance of {@link Database } - * - */ - public Database createDatabase() { - return new Database(); - } - - /** - * Create an instance of {@link Schemata.Schema } - * - */ - public Schemata.Schema createSchemataSchema() { - return new Schemata.Schema(); - } - - /** - * Create an instance of {@link Generate } - * - */ - public Generate createGenerate() { - return new Generate(); - } - - /** - * Create an instance of {@link Database.ForcedTypes } - * - */ - public Database.ForcedTypes createDatabaseForcedTypes() { - return new Database.ForcedTypes(); - } - - /** - * Create an instance of {@link Schemata } - * - */ - public Schemata createSchemata() { - return new Schemata(); - } - - /** - * Create an instance of {@link Jdbc } - * - */ - public Jdbc createJdbc() { - return new Jdbc(); - } - - /** - * Create an instance of {@link ForcedType } - * - */ - public ForcedType createForcedType() { - return new ForcedType(); - } - - /** - * Create an instance of {@link Database.EnumTypes } - * - */ - public Database.EnumTypes createDatabaseEnumTypes() { - return new Database.EnumTypes(); - } - -} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schema.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schema.java new file mode 100644 index 0000000000..b9dedc31e1 --- /dev/null +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schema.java @@ -0,0 +1,96 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2012.02.11 at 03:39:37 PM MEZ +// + + +package org.jooq.util.jaxb; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for Schema complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="Schema">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <all>
+ *         <element name="inputSchema" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="outputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </all>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Schema", propOrder = { + +}) +public class Schema { + + @XmlElement(required = true, defaultValue = "") + protected String inputSchema; + @XmlElement(defaultValue = "") + protected String outputSchema; + + /** + * Gets the value of the inputSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInputSchema() { + return inputSchema; + } + + /** + * Sets the value of the inputSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInputSchema(String value) { + this.inputSchema = value; + } + + /** + * Gets the value of the outputSchema property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOutputSchema() { + return outputSchema; + } + + /** + * Sets the value of the outputSchema property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOutputSchema(String value) { + this.outputSchema = value; + } + +} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schemata.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schemata.java deleted file mode 100644 index fb0d2b8c21..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Schemata.java +++ /dev/null @@ -1,169 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ -// - - -package org.jooq.util.jaxb; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for Schemata complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="Schemata">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="schema" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <all>
- *                   <element name="inputSchema" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *                   <element name="outputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *                 </all>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Schemata", propOrder = { - "schema" -}) -public class Schemata { - - @XmlElement(required = true) - protected List schema; - - /** - * Gets the value of the schema property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the schema property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getSchema().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Schemata.Schema } - * - * - */ - public List getSchema() { - if (schema == null) { - schema = new ArrayList(); - } - return this.schema; - } - - - /** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

-     * <complexType>
-     *   <complexContent>
-     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       <all>
-     *         <element name="inputSchema" type="{http://www.w3.org/2001/XMLSchema}string"/>
-     *         <element name="outputSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
-     *       </all>
-     *     </restriction>
-     *   </complexContent>
-     * </complexType>
-     * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - - }) - public static class Schema { - - @XmlElement(required = true, defaultValue = "") - protected String inputSchema; - @XmlElement(defaultValue = "") - protected String outputSchema; - - /** - * Gets the value of the inputSchema property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getInputSchema() { - return inputSchema; - } - - /** - * Sets the value of the inputSchema property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setInputSchema(String value) { - this.inputSchema = value; - } - - /** - * Gets the value of the outputSchema property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getOutputSchema() { - return outputSchema; - } - - /** - * Sets the value of the outputSchema property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setOutputSchema(String value) { - this.outputSchema = value; - } - - } - -} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java index 749b3a409f..fe79cb01e4 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Strategy.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java index b149802ac9..a5ab64a399 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Target.java @@ -1,8 +1,8 @@ // -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ +// Generated on: 2012.02.11 at 03:39:37 PM MEZ // diff --git a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java b/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java deleted file mode 100644 index 419fb59429..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/jaxb/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.02.11 at 11:05:31 AM MEZ -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package org.jooq.util.jaxb; diff --git a/jOOQ-meta/src/main/java/org/jooq/util/sqlite/SQLiteDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/sqlite/SQLiteDatabase.java index 22cfa33495..9af8b52e47 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/sqlite/SQLiteDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/sqlite/SQLiteDatabase.java @@ -53,8 +53,7 @@ import org.jooq.util.RoutineDefinition; import org.jooq.util.SequenceDefinition; import org.jooq.util.TableDefinition; import org.jooq.util.UDTDefinition; -import org.jooq.util.jaxb.Schemata; -import org.jooq.util.jaxb.Schemata.Schema; +import org.jooq.util.jaxb.Schema; import org.jooq.util.sqlite.sqlite_master.SQLiteMaster; /** @@ -71,10 +70,10 @@ public class SQLiteDatabase extends AbstractDatabase { schema.setInputSchema(""); schema.setOutputSchema(""); - Schemata s = new Schemata(); - s.getSchema().add(schema); + List schemata = new ArrayList(); + schemata.add(schema); - setConfiguredSchemata(s); + setConfiguredSchemata(schemata); } @Override diff --git a/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd b/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd index 0f0dee7ad5..19c76b583d 100644 --- a/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd +++ b/jOOQ-meta/src/main/resources/jooq-codegen-2.0.4.xsd @@ -92,46 +92,52 @@ minOccurs="0" maxOccurs="1" /> + + + + - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +