[#395] Use XML configuration file instead of plain properties file

This commit is contained in:
Lukas Eder 2012-01-29 21:28:55 +00:00
parent 53ad31933c
commit 9bb49fc234
22 changed files with 430 additions and 100 deletions

View File

@ -85,7 +85,7 @@ public class GenerationTool {
* @throws Exception
*/
public static void main(String[] args) throws Exception {
if (args.length != 1) {
if (args.length < 1) {
error();
}
@ -108,7 +108,7 @@ public class GenerationTool {
else {
Properties properties = new Properties();
properties.load(in);
main(properties);
main(properties, args);
}
} catch (Exception e) {
log.error("Cannot read " + args[0] + ". Error : " + e.getMessage());
@ -120,11 +120,7 @@ public class GenerationTool {
}
}
public static void main(Properties properties) throws Exception {
log.warn("WARNING: jooq-codegen source code generation using .properties files is deprecated");
log.warn("WARNING: consider using XML configuration instead");
log.warn("WARNING: See http://www.jooq.org/manual/META/Configuration/ for more details");
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"));
@ -137,6 +133,8 @@ public class GenerationTool {
MasterDataTables masterDataTables = new MasterDataTables();
for (String name : defaultString(properties.getProperty("generator.generate.master-data-tables")).split(",")) {
if (isBlank(name)) continue;
MasterDataTable table = new MasterDataTable();
table.setName(name);
@ -177,9 +175,16 @@ public class GenerationTool {
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.setMasterDataTables(masterDataTables);
database.setEnumTypes(enumTypes);
database.setForcedTypes(forcedTypes);
// Avoid creating these empty elements when migrating
if (!masterDataTables.getMasterDataTable().isEmpty())
database.setMasterDataTables(masterDataTables);
if (!enumTypes.getEnumType().isEmpty())
database.setEnumTypes(enumTypes);
if (!forcedTypes.getForcedType().isEmpty())
database.setForcedTypes(forcedTypes);
Target target = new Target();
target.setPackageName(properties.getProperty("generator.target.package"));
@ -193,7 +198,10 @@ public class GenerationTool {
generate.setGeneratedAnnotation(!"false".equalsIgnoreCase(properties.getProperty("generator.generate.generated-annotation")));
org.jooq.util.jaxb.Generator generator = new org.jooq.util.jaxb.Generator();
generator.setStrategy(strategy);
if (!isBlank(strategy.getName()))
generator.setStrategy(strategy);
generator.setDatabase(database);
generator.setTarget(target);
generator.setGenerate(generate);
@ -203,7 +211,21 @@ public class GenerationTool {
configuration.setJdbc(jdbc);
configuration.setGenerator(generator);
main(configuration);
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 <configuration-file> migrate");
log.info("");
main(configuration);
}
else if ("migrate".equals(args[1])) {
log.info("Migrating properties to XML");
JAXB.marshal(configuration, System.out);
}
}
@SuppressWarnings("unchecked")

View File

@ -14,6 +14,6 @@
<!-- Run a full mvn clean package install deploy first before this -->
<target name="xjc-generator" description="Generate JAXB artefacts from XSD">
<mkdir dir="${dir.java}/org/jooq/util/jaxb" />
<xjc schema="${dir.resources}/jooq-codegen.xsd" destdir="${dir.java}" package="org.jooq.util.jaxb"/>
<xjc schema="${dir.resources}/jooq-codegen-2.0.4.xsd" destdir="${dir.java}" package="org.jooq.util.jaxb"/>
</target>
</project>

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@ -25,8 +25,8 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen}Jdbc"/>
* &lt;element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen}Generator"/>
* &lt;element name="jdbc" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Jdbc"/>
* &lt;element name="generator" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Generator"/>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -53,7 +53,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -64,7 +64,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -327,7 +327,7 @@ public class Database {
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="enumType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}EnumType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -386,7 +386,7 @@ public class Database {
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="forcedType" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}ForcedType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -445,7 +445,7 @@ public class Database {
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="masterDataTable" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}MasterDataTable" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@ -29,10 +29,10 @@ import javax.xml.bind.annotation.XmlType;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="strategy" type="{http://www.jooq.org/xsd/jooq-codegen}Strategy" minOccurs="0"/>
* &lt;element name="database" type="{http://www.jooq.org/xsd/jooq-codegen}Database"/>
* &lt;element name="generate" type="{http://www.jooq.org/xsd/jooq-codegen}Generate" minOccurs="0"/>
* &lt;element name="target" type="{http://www.jooq.org/xsd/jooq-codegen}Target" minOccurs="0"/>
* &lt;element name="strategy" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Strategy" minOccurs="0"/>
* &lt;element name="database" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Database"/>
* &lt;element name="generate" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Generate" minOccurs="0"/>
* &lt;element name="target" type="{http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd}Target" minOccurs="0"/>
* &lt;/all>
* &lt;/restriction>
* &lt;/complexContent>

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@ -29,7 +29,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;all>
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="literal" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="literal" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/all>
* &lt;/restriction>
@ -47,7 +47,6 @@ public class MasterDataTable {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String literal;
protected String description;

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@ -36,6 +36,46 @@ public class ObjectFactory {
public ObjectFactory() {
}
/**
* Create an instance of {@link Strategy }
*
*/
public Strategy createStrategy() {
return new Strategy();
}
/**
* Create an instance of {@link Jdbc }
*
*/
public Jdbc createJdbc() {
return new Jdbc();
}
/**
* Create an instance of {@link Database }
*
*/
public Database createDatabase() {
return new Database();
}
/**
* Create an instance of {@link Generate }
*
*/
public Generate createGenerate() {
return new Generate();
}
/**
* Create an instance of {@link Target }
*
*/
public Target createTarget() {
return new Target();
}
/**
* Create an instance of {@link Database.MasterDataTables }
*
@ -44,14 +84,6 @@ public class ObjectFactory {
return new Database.MasterDataTables();
}
/**
* Create an instance of {@link ForcedType }
*
*/
public ForcedType createForcedType() {
return new ForcedType();
}
/**
* Create an instance of {@link Generator }
*
@ -68,22 +100,6 @@ public class ObjectFactory {
return new MasterDataTable();
}
/**
* Create an instance of {@link EnumType }
*
*/
public EnumType createEnumType() {
return new EnumType();
}
/**
* Create an instance of {@link Strategy }
*
*/
public Strategy createStrategy() {
return new Strategy();
}
/**
* Create an instance of {@link Database.ForcedTypes }
*
@ -93,43 +109,19 @@ public class ObjectFactory {
}
/**
* Create an instance of {@link Target }
* Create an instance of {@link EnumType }
*
*/
public Target createTarget() {
return new Target();
public EnumType createEnumType() {
return new EnumType();
}
/**
* Create an instance of {@link Configuration }
* Create an instance of {@link ForcedType }
*
*/
public Configuration createConfiguration() {
return new Configuration();
}
/**
* Create an instance of {@link Jdbc }
*
*/
public Jdbc createJdbc() {
return new Jdbc();
}
/**
* Create an instance of {@link Generate }
*
*/
public Generate createGenerate() {
return new Generate();
}
/**
* Create an instance of {@link Database }
*
*/
public Database createDatabase() {
return new Database();
public ForcedType createForcedType() {
return new ForcedType();
}
/**
@ -140,4 +132,12 @@ public class ObjectFactory {
return new Database.EnumTypes();
}
/**
* Create an instance of {@link Configuration }
*
*/
public Configuration createConfiguration() {
return new Configuration();
}
}

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//

View File

@ -2,8 +2,8 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.01.29 at 09:33:16 PM MEZ
// Generated on: 2012.01.29 at 10:08:11 PM MEZ
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-codegen", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
@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;

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.jooq.org/xsd/jooq-codegen"
targetNamespace="http://www.jooq.org/xsd/jooq-codegen"
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd"
targetNamespace="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd"
elementFormDefault="qualified">
<element name="configuration">
@ -121,7 +122,7 @@
</annotation>
<all>
<element name="name" type="string" minOccurs="1" maxOccurs="1" />
<element name="literal" type="string" minOccurs="1"
<element name="literal" type="string" minOccurs="0"
maxOccurs="1" />
<element name="description" type="string" minOccurs="0"
maxOccurs="1" />

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd">
<jdbc>
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
<url>jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;integratedSecurity=true</url>
<schema>dbo</schema>
<user></user>
<password></password>
</jdbc>
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.sqlserver.SQLServerDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<dateAsTimestamp>false</dateAsTimestamp>
</database>
<generate>
<relations>true</relations>
<deprecated>true</deprecated>
<instanceFields>true</instanceFields>
<unsignedTypes>true</unsignedTypes>
<generatedAnnotation>false</generatedAnnotation>
</generate>
<target>
<packageName>org.jooq.examples.sqlserver.adventureworks.dbo</packageName>
<directory>./examples</directory>
</target>
</generator>
</configuration>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd">
<jdbc>
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
<url>jdbc:sqlserver://localhost:1433;databaseName=test;integratedSecurity=true</url>
<schema>dbo</schema>
<user></user>
<password></password>
</jdbc>
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<strategy/>
<database>
<name>org.jooq.util.sqlserver.SQLServerDatabase</name>
<includes>t_.*,x_.*,v_.*,p_.*,f_.*,(f|p)[0-9]+,s_.*</includes>
<excludes>t_book_details</excludes>
<dateAsTimestamp>false</dateAsTimestamp>
<masterDataTables>
<masterDataTable>
<name>t_language</name>
<literal>cd</literal>
<description>description</description>
</masterDataTable>
<masterDataTable>
<name>t_658_11</name>
</masterDataTable>
<masterDataTable>
<name>t_658_21</name>
</masterDataTable>
<masterDataTable>
<name>t_658_31</name>
</masterDataTable>
<masterDataTable>
<name>t_658_12</name>
<literal>cd</literal>
</masterDataTable>
<masterDataTable>
<name>t_658_22</name>
<literal>cd</literal>
</masterDataTable>
<masterDataTable>
<name>t_658_32</name>
<literal>cd</literal>
</masterDataTable>
</masterDataTables>
<enumTypes>
<enumType>
<name>BOOLEAN_YN_LC</name>
<literals>y,&quot;n&quot;</literals>
</enumType>
<enumType>
<name>BOOLEAN_YN_UC</name>
<literals>&quot;Y&quot;,N</literals>
</enumType>
<enumType>
<name>BOOLEAN_TRUE_FALSE_LC</name>
<literals>true,false</literals>
</enumType>
<enumType>
<name>BOOLEAN_TRUE_FALSE_UC</name>
<literals>TRUE,FALSE</literals>
</enumType>
<enumType>
<name>BOOLEAN_10</name>
<literals>1,0</literals>
</enumType>
<enumType>
<name>BOOLEAN_YES_NO_LC</name>
<literals>yes,no</literals>
</enumType>
<enumType>
<name>BOOLEAN_YES_NO_UC</name>
<literals>&quot;YES&quot;,&quot;NO&quot;</literals>
</enumType>
</enumTypes>
<forcedTypes>
<forcedType>
<name>BOOLEAN_YES_NO_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.YES_NO_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YES_NO_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.YES_NO_UC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YN_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.Y_N_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YN_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.Y_N_UC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_TRUE_FALSE_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_TRUE_FALSE_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_UC)</expressions>
</forcedType>
<forcedType>
<name>BIT</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.(VC|C|N)_BOOLEAN)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_10</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.ONE_ZERO)</expressions>
</forcedType>
</forcedTypes>
</database>
<generate>
<relations>true</relations>
<deprecated>true</deprecated>
<instanceFields>true</instanceFields>
<unsignedTypes>true</unsignedTypes>
<generatedAnnotation>false</generatedAnnotation>
</generate>
<target>
<packageName>org.jooq.test.sqlserver.generatedclasses</packageName>
<directory>./src</directory>
</target>
</generator>
</configuration>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd">
<jdbc>
<driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
<url>jdbc:sybase:Tds:localhost:2638</url>
<schema>dba</schema>
<user>dba</user>
<password>sql</password>
</jdbc>
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<strategy/>
<database>
<name>org.jooq.util.sybase.SybaseDatabase</name>
<includes>t_.*,x_.*,v_.*,V_.*,p_.*,f_.*,(f|p)[0-9]+,s_.*</includes>
<excludes>t_book_details</excludes>
<dateAsTimestamp>false</dateAsTimestamp>
<masterDataTables>
<masterDataTable>
<name>t_language</name>
<literal>cd</literal>
<description>description</description>
</masterDataTable>
<masterDataTable>
<name>t_658_11</name>
</masterDataTable>
<masterDataTable>
<name>t_658_21</name>
</masterDataTable>
<masterDataTable>
<name>t_658_31</name>
</masterDataTable>
<masterDataTable>
<name>t_658_12</name>
<literal>cd</literal>
</masterDataTable>
<masterDataTable>
<name>t_658_22</name>
<literal>cd</literal>
</masterDataTable>
<masterDataTable>
<name>t_658_32</name>
<literal>cd</literal>
</masterDataTable>
</masterDataTables>
<enumTypes>
<enumType>
<name>BOOLEAN_TRUE_FALSE_LC</name>
<literals>true,false</literals>
</enumType>
<enumType>
<name>BOOLEAN_TRUE_FALSE_UC</name>
<literals>TRUE,FALSE</literals>
</enumType>
<enumType>
<name>BOOLEAN_YN_LC</name>
<literals>y,&quot;n&quot;</literals>
</enumType>
<enumType>
<name>BOOLEAN_YN_UC</name>
<literals>&quot;Y&quot;,N</literals>
</enumType>
<enumType>
<name>BOOLEAN_10</name>
<literals>1,0</literals>
</enumType>
<enumType>
<name>BOOLEAN_YES_NO_LC</name>
<literals>yes,no</literals>
</enumType>
<enumType>
<name>BOOLEAN_YES_NO_UC</name>
<literals>&quot;YES&quot;,&quot;NO&quot;</literals>
</enumType>
</enumTypes>
<forcedTypes>
<forcedType>
<name>BOOLEAN_YN_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.Y_N_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YN_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.Y_N_UC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_10</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.ONE_ZERO)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_TRUE_FALSE_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_TRUE_FALSE_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.TRUE_FALSE_UC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YES_NO_LC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.YES_NO_LC)</expressions>
</forcedType>
<forcedType>
<name>BOOLEAN_YES_NO_UC</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.YES_NO_UC)</expressions>
</forcedType>
<forcedType>
<name>BIT</name>
<expressions>(?i:(.*?.)?T_BOOLEANS.(VC|C|N)_BOOLEAN)</expressions>
</forcedType>
</forcedTypes>
</database>
<generate>
<relations>true</relations>
<deprecated>true</deprecated>
<instanceFields>true</instanceFields>
<unsignedTypes>true</unsignedTypes>
<generatedAnnotation>false</generatedAnnotation>
</generate>
<target>
<packageName>org.jooq.test.sybase.generatedclasses</packageName>
<directory>./src</directory>
</target>
</generator>
</configuration>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<stringAttribute key="bad_container_name" value="/jOOQ-codegen/launch"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/jOOQ-meta"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;jOOQ-codegen&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOU&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ-codegen&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ-test&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/jOOQ-test/lib/jconn3.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;jOOQ-meta&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER&quot; javaProject=&quot;jOOQ-meta&quot; path=&quot;3&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/jOOQ-test/lib/log4j-1.2.16.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.util.GenerationTool"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sqlserver/adventureworks.properties migrate"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-meta"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:jOOQ-test}"/>
</launchConfiguration>

View File

@ -36,7 +36,7 @@
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.util.GenerationTool"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sqlserver/adventureworks.properties"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sqlserver/adventureworks.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-codegen"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.library.path=C:\sqljdbc_3.0\enu\auth\x64"/>

View File

@ -36,7 +36,7 @@
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.util.GenerationTool"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sqlserver/library.properties"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sqlserver/library.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-codegen"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.library.path=C:\sqljdbc_3.0\enu\auth\x64"/>

View File

@ -25,7 +25,7 @@
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.util.GenerationTool"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sybase/library.properties"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="/org/jooq/configuration/${env_var:USERNAME}/sybase/library.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-meta"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:jOOQ-test}"/>