This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch past-M2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/past-M2 by this push:
new c36202c07 CAY-2963 Replace TypesHandler / types.xml with hardcoded map
c36202c07 is described below
commit c36202c0778af1c98dac5ff016cd668b2f1608ae
Author: Andrus Adamchik <[email protected]>
AuthorDate: Fri Jun 12 20:14:12 2026 -0400
CAY-2963 Replace TypesHandler / types.xml with hardcoded map
---
RELEASE-NOTES.txt | 1 +
.../java/org/apache/cayenne/dba/JdbcAdapter.java | 82 +++++++------
.../java/org/apache/cayenne/dba/TypesHandler.java | 132 ---------------------
.../org/apache/cayenne/dba/db2/DB2Adapter.java | 44 ++++++-
.../org/apache/cayenne/dba/derby/DerbyAdapter.java | 43 ++++++-
.../cayenne/dba/firebird/FirebirdAdapter.java | 44 ++++++-
.../cayenne/dba/frontbase/FrontBaseAdapter.java | 39 +++++-
.../java/org/apache/cayenne/dba/h2/H2Adapter.java | 45 ++++++-
.../apache/cayenne/dba/hsqldb/HSQLDBAdapter.java | 44 ++++++-
.../apache/cayenne/dba/ingres/IngresAdapter.java | 43 ++++++-
.../org/apache/cayenne/dba/mysql/MySQLAdapter.java | 39 +++++-
.../apache/cayenne/dba/oracle/OracleAdapter.java | 40 ++++++-
.../cayenne/dba/postgres/PostgresAdapter.java | 42 ++++++-
.../apache/cayenne/dba/sqlite/SQLiteAdapter.java | 45 ++++++-
.../cayenne/dba/sqlserver/SQLServerAdapter.java | 40 ++++++-
.../apache/cayenne/dba/sybase/SybaseAdapter.java | 39 +++++-
.../resources/org/apache/cayenne/dba/db2/types.xml | 123 -------------------
.../org/apache/cayenne/dba/derby/types.xml | 126 --------------------
.../org/apache/cayenne/dba/firebird/types.xml | 126 --------------------
.../org/apache/cayenne/dba/frontbase/types.xml | 118 ------------------
.../resources/org/apache/cayenne/dba/h2/types.xml | 126 --------------------
.../org/apache/cayenne/dba/hsqldb/types.xml | 123 -------------------
.../org/apache/cayenne/dba/ingres/types.xml | 117 ------------------
.../org/apache/cayenne/dba/mysql/types.xml | 121 -------------------
.../org/apache/cayenne/dba/oracle/types.xml | 117 ------------------
.../org/apache/cayenne/dba/postgres/types.xml | 120 -------------------
.../org/apache/cayenne/dba/sqlite/types.xml | 129 --------------------
.../org/apache/cayenne/dba/sqlserver/types.xml | 115 ------------------
.../org/apache/cayenne/dba/sybase/types.xml | 113 ------------------
.../resources/org/apache/cayenne/dba/types.xml | 132 ---------------------
.../runtime/DataDomainProviderTest.java | 6 -
31 files changed, 555 insertions(+), 1919 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 38baf8ef2..62c80db7e 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -15,6 +15,7 @@ Changes/New Features:
CAY-2956 Get rid of a dedicated adapter for Oracle 8
CAY-2957 Get rid of adapter for legacy HSQLDB <= 1.8
+CAY-2963 Replace TypesHandler / types.xml with hardcoded map
Bug Fixes:
diff --git a/cayenne/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
index b7c10530a..9ff9c3e06 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
@@ -47,18 +47,16 @@ import org.apache.cayenne.query.ProcedureQuery;
import org.apache.cayenne.query.Select;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.Resource;
-import org.apache.cayenne.resource.ResourceLocator;
-import org.apache.cayenne.util.Util;
-import java.net.URL;
import java.sql.PreparedStatement;
import java.sql.Types;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
/**
* A generic DbAdapter implementation. Can be used as a default adapter or as a
@@ -69,14 +67,13 @@ public class JdbcAdapter implements DbAdapter {
private PkGenerator pkGenerator;
protected QuotingStrategy quotingStrategy;
- protected TypesHandler typesHandler;
+ protected Map<Integer, String[]> externalTypes;
protected ExtendedTypeMap extendedTypes;
protected boolean supportsBatchUpdates;
protected boolean supportsUniqueConstraints;
protected boolean supportsGeneratedKeys;
protected EJBQLTranslator ejbqlTranslator;
- protected ResourceLocator resourceLocator;
protected boolean caseInsensitiveCollations;
@Inject
@@ -89,19 +86,17 @@ public class JdbcAdapter implements DbAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
// init defaults
this.setSupportsBatchUpdates(false);
this.setSupportsUniqueConstraints(true);
this.caseInsensitiveCollations =
runtimeProperties.getBoolean(Constants.CI_PROPERTY, false);
- this.resourceLocator = resourceLocator;
this.quotingStrategy = createQuotingStrategy();
this.ejbqlTranslator = createEJBQLTranslator();
- this.typesHandler =
TypesHandler.getHandler(findResource("/types.xml"));
+ this.externalTypes = createExternalTypes();
this.extendedTypes = new ExtendedTypeMap();
initExtendedTypes(defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
}
@@ -124,33 +119,50 @@ public class JdbcAdapter implements DbAdapter {
}
/**
- * Locates and returns a named adapter resource. A resource can be an XML
- * file, etc.
- * <p>
- * This implementation is based on the premise that each adapter is located
- * in its own Java package and all resources are in the same package as
- * well. Resource lookup is recursive, so that if DbAdapter is a subclass
of
- * another adapter, parent adapter package is searched as a failover.
- * </p>
+ * Creates the mapping of JDBC types to RDBMS type names used for DDL
generation. The first name in each
+ * array is used for column DDL; some adapters use subsequent names for
special cases (e.g. PostgreSQL
+ * serial types for generated columns). Subclasses override this method,
mapping every type supported by
+ * the target database explicitly, without calling the superclass.
*
- * @since 3.0
+ * @since 5.0
*/
- protected URL findResource(String name) {
- Class<?> adapterClass = getClass();
-
- while (adapterClass != null &&
JdbcAdapter.class.isAssignableFrom(adapterClass)) {
-
- String path = Util.getPackagePath(adapterClass.getName()) + name;
- Collection<Resource> resources =
resourceLocator.findResources(path);
-
- if (!resources.isEmpty()) {
- return resources.iterator().next().getURL();
- }
-
- adapterClass = adapterClass.getSuperclass();
- }
-
- return null;
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.ROWID, new String[]{"ROWID"});
+ types.put(Types.BINARY, new String[]{"BINARY"});
+ types.put(Types.BIT, new String[]{"BIT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.NCLOB, new String[]{"NCLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONGVARBINARY"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONGVARCHAR"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONGNVARCHAR"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"VARBINARY"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ types.put(Types.NVARCHAR, new String[]{"NVARCHAR"});
+ types.put(Types.SQLXML, new String[]{"SQLXML"});
+ return types;
}
/**
@@ -477,7 +489,7 @@ public class JdbcAdapter implements DbAdapter {
@Override
public String[] externalTypesForJdbcType(int type) {
- return typesHandler.externalTypesForJdbcType(type);
+ return externalTypes.get(type);
}
@Override
diff --git a/cayenne/src/main/java/org/apache/cayenne/dba/TypesHandler.java
b/cayenne/src/main/java/org/apache/cayenne/dba/TypesHandler.java
deleted file mode 100644
index 838e39a5f..000000000
--- a/cayenne/src/main/java/org/apache/cayenne/dba/TypesHandler.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ****************************************************************/
-
-package org.apache.cayenne.dba;
-
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.util.Util;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * TypesHandler provides JDBC-RDBMS types mapping. Loads types info from an XML
- * file.
- *
- */
-public class TypesHandler {
-
- private static Map<URL, TypesHandler> handlerMap = new HashMap<>();
-
- protected Map<Integer, String[]> typesMap;
-
- /**
- * @since 1.1
- */
- public static TypesHandler getHandler(URL typesConfig) {
- synchronized (handlerMap) {
- TypesHandler handler = handlerMap.get(typesConfig);
-
- if (handler == null) {
- handler = new TypesHandler(typesConfig);
- handlerMap.put(typesConfig, handler);
- }
-
- return handler;
- }
- }
-
- /**
- * Creates new TypesHandler loading configuration info from the XML file
- * specified as <code>typesConfigPath</code> parameter.
- *
- * @since 1.1
- */
- public TypesHandler(URL typesConfig) {
-
- try (InputStream in = typesConfig.openStream();) {
- XMLReader parser = Util.createXmlReader();
- TypesParseHandler ph = new TypesParseHandler();
- parser.setContentHandler(ph);
- parser.setErrorHandler(ph);
- parser.parse(new InputSource(in));
-
- typesMap = ph.getTypes();
- } catch (Exception ex) {
- throw new CayenneRuntimeException("Error creating
TypesHandler '" + typesConfig + "'.", ex);
- }
- }
-
- public String[] externalTypesForJdbcType(int type) {
- return typesMap.get(type);
- }
-
- /**
- * Helper class to load types data from XML.
- */
- final class TypesParseHandler extends DefaultHandler {
- private static final String JDBC_TYPE_TAG = "jdbc-type";
- private static final String DB_TYPE_TAG = "db-type";
- private static final String NAME_ATTR = "name";
-
- private Map<Integer, String[]> types = new HashMap<>();
- private List<String> currentTypes = new ArrayList<>();
- private int currentType = TypesMapping.NOT_DEFINED;
-
- public Map<Integer, String[]> getTypes() {
- return types;
- }
-
- @Override
- public void startElement(String namespaceURI, String localName,
String qName, Attributes atts)
- throws SAXException {
- if (JDBC_TYPE_TAG.equals(localName)) {
- currentTypes.clear();
- String strType = atts.getValue("", NAME_ATTR);
-
- // convert to Types int value
- try {
- currentType =
Types.class.getDeclaredField(strType).getInt(null);
- } catch (Exception ex) {
- currentType = TypesMapping.NOT_DEFINED;
- }
- } else if (DB_TYPE_TAG.equals(localName)) {
- currentTypes.add(atts.getValue("", NAME_ATTR));
- }
- }
-
- @Override
- public void endElement(String namespaceURI, String localName,
String qName) throws SAXException {
- if (JDBC_TYPE_TAG.equals(localName) && currentType !=
TypesMapping.NOT_DEFINED) {
- String[] typesAsArray = new
String[currentTypes.size()];
- types.put(Integer.valueOf(currentType),
currentTypes.toArray(typesAsArray));
- }
- }
- }
-}
diff --git a/cayenne/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
index 21f5a793d..e9db3d86b 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/db2/DB2Adapter.java
@@ -45,7 +45,8 @@ import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
+import java.util.HashMap;
+import java.util.Map;
/**
* DbAdapter implementation for the <a href="http://www.ibm.com/db2/"> DB2
RDBMS </a>.
@@ -68,12 +69,49 @@ public class DB2Adapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType>
defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, resourceLocator, valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"CHAR FOR BIT DATA"});
+ types.put(Types.BIT, new String[]{"SMALLINT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"SMALLINT"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"DBCLOB"});
+ types.put(Types.LONGVARBINARY, new String[]{"BLOB"});
+ types.put(Types.LONGVARCHAR, new String[]{"CLOB"});
+ types.put(Types.NCHAR, new String[]{"GRAPHIC"});
+ types.put(Types.NCLOB, new String[]{"NCLOB"});
+ types.put(Types.NUMERIC, new String[]{"DECIMAL"});
+ types.put(Types.NVARCHAR, new String[]{"VARGRAPHIC"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"SMALLINT"});
+ types.put(Types.VARBINARY, new String[]{"VARCHAR FOR BIT DATA"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
super.configureExtendedTypes(map);
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
index 954c90476..3fd91e1eb 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/derby/DerbyAdapter.java
@@ -41,12 +41,13 @@ import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for the <a href="http://db.apache.org/derby/">
Derby RDBMS
@@ -75,19 +76,55 @@ public class DerbyAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType>
defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
super(
runtimeProperties,
defaultExtendedTypes,
userExtendedTypes,
extendedTypeFactories,
- resourceLocator,
valueObjectTypeRegistry);
setSupportsGeneratedKeys(true);
setSupportsBatchUpdates(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"CHAR FOR BIT DATA"});
+ types.put(Types.BIT, new String[]{"SMALLINT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE PRECISION"});
+ types.put(Types.FLOAT, new String[]{"DOUBLE PRECISION"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONG VARCHAR"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONG VARCHAR FOR BIT
DATA"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONG VARCHAR"});
+ types.put(Types.NCHAR, new String[]{"CHAR"});
+ types.put(Types.NCLOB, new String[]{"CLOB"});
+ types.put(Types.NUMERIC, new String[]{"DECIMAL"});
+ types.put(Types.NVARCHAR, new String[]{"VARCHAR"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"SMALLINT"});
+ types.put(Types.VARBINARY, new String[]{"VARCHAR FOR BIT DATA"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
/**
* Not supported, see: <a
href="https://issues.apache.org/jira/browse/DERBY-3609">DERBY-3609</a>
*/
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
index 1c804391a..0fab4f53c 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/firebird/FirebirdAdapter.java
@@ -36,9 +36,11 @@ import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
+import java.sql.Types;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a
href="http://www.firebirdsql.org">FirebirdSQL
@@ -61,17 +63,53 @@ public class FirebirdAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType>
defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
super(
runtimeProperties,
defaultExtendedTypes,
userExtendedTypes,
extendedTypeFactories,
- resourceLocator,
valueObjectTypeRegistry);
setSupportsBatchUpdates(true);
}
+
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"BLOB"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"BLOB"});
+ types.put(Types.BIT, new String[]{"SMALLINT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"SMALLINT"});
+ types.put(Types.CHAR, new String[]{"VARCHAR"});
+ types.put(Types.CLOB, new String[]{"BLOB SUB_TYPE TEXT"});
+ types.put(Types.DATALINK, new String[]{"BLOB"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE PRECISION"});
+ types.put(Types.FLOAT, new String[]{"DOUBLE PRECISION"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"BLOB"});
+ types.put(Types.LONGNVARCHAR, new String[]{"BLOB SUB_TYPE TEXT"});
+ types.put(Types.LONGVARBINARY, new String[]{"BLOB"});
+ types.put(Types.LONGVARCHAR, new String[]{"BLOB SUB_TYPE TEXT"});
+ types.put(Types.NCHAR, new String[]{"CHAR CHARACTER SET UNICODE_FSS"});
+ types.put(Types.NCLOB, new String[]{"BLOB SUB_TYPE TEXT"});
+ types.put(Types.NUMERIC, new String[]{"DECIMAL"});
+ types.put(Types.NVARCHAR, new String[]{"VARCHAR CHARACTER SET
UNICODE_FSS"});
+ types.put(Types.OTHER, new String[]{"BLOB"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"BLOB"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.STRUCT, new String[]{"BLOB"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"SMALLINT"});
+ types.put(Types.VARBINARY, new String[]{"BLOB"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
protected void configureExtendedTypes(ExtendedTypeMap map) {
super.configureExtendedTypes(map);
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
index 6d87a64b5..83f480bf6 100644
---
a/cayenne/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
+++
b/cayenne/src/main/java/org/apache/cayenne/dba/frontbase/FrontBaseAdapter.java
@@ -43,7 +43,8 @@ import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.map.DbEntity;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
+import java.util.HashMap;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.frontbase.com/">FrontBase
@@ -72,12 +73,44 @@ public class FrontBaseAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, valueObjectTypeRegistry);
setSupportsBatchUpdates(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"LONGINT"});
+ types.put(Types.BINARY, new String[]{"BIT"});
+ types.put(Types.BIT, new String[]{"BIT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE PRECISION"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.LONGNVARCHAR, new String[]{"CHAR VARYING"});
+ types.put(Types.LONGVARBINARY, new String[]{"BLOB"});
+ types.put(Types.LONGVARCHAR, new String[]{"CHAR VARYING"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.NCLOB, new String[]{"CLOB"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"CHAR VARYING"});
+ types.put(Types.OTHER, new String[]{"INTERVAL"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"SMALLINT"});
+ types.put(Types.VARBINARY, new String[]{"BIT VARYING"});
+ types.put(Types.VARCHAR, new String[]{"CHAR VARYING"});
+ return types;
+ }
+
/**
* @since 4.2
*/
diff --git a/cayenne/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
index 0a2383cba..fa5cb1f2e 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/h2/H2Adapter.java
@@ -35,10 +35,11 @@ import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.Types;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.h2database.com/">H2
@@ -59,12 +60,50 @@ public class H2Adapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType>
defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, resourceLocator, valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"BINARY"});
+ types.put(Types.BIT, new String[]{"BIT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"NCLOB"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONGVARBINARY"});
+ types.put(Types.LONGVARCHAR, new String[]{"CLOB"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.NCLOB, new String[]{"NCLOB"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"NVARCHAR"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.SQLXML, new String[]{"NCLOB"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"VARBINARY"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
@Override
public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute
column) {
super.createTableAppendColumn(sqlBuffer, column);
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
index 8178768a7..5ed13c90c 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
@@ -43,12 +43,13 @@ import org.apache.cayenne.map.EntityResolver;
import org.apache.cayenne.query.ProcedureQuery;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.Types;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for the <a href="http://hsqldb.sourceforge.net/">
@@ -70,12 +71,49 @@ public class HSQLDBAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, valueObjectTypeRegistry);
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"BINARY"});
+ types.put(Types.BIT, new String[]{"BIT"});
+ types.put(Types.BLOB, new String[]{"LONGVARBINARY"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"LONGVARCHAR"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONGVARCHAR"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONGVARBINARY"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONGVARCHAR"});
+ types.put(Types.NCHAR, new String[]{"CHAR"});
+ types.put(Types.NCLOB, new String[]{"LONGVARCHAR"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"VARCHAR"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"VARBINARY"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
/**
* @since 4.0
*/
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
index b97549e70..d56c80e4b 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
@@ -36,12 +36,13 @@ import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a
@@ -63,13 +64,49 @@ public class IngresAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST)
List<ExtendedType> userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR)
ResourceLocator resourceLocator,
@Inject
ValueObjectTypeRegistry valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, valueObjectTypeRegistry);
setSupportsUniqueConstraints(true);
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"BYTE"});
+ types.put(Types.BIT, new String[]{"TINYINT"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOLEAN"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"FLOAT"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONG NVARCHAR"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONG BYTE"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONG VARCHAR"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.NCLOB, new String[]{"LONG NVARCHAR"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"NVARCHAR"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"BYTE VARYING"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
/**
* @since 4.2
*/
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
index 190726e79..12ec6a15f 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
@@ -49,15 +49,16 @@ import org.apache.cayenne.map.EntityResolver;
import org.apache.cayenne.query.ProcedureQuery;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.PreparedStatement;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.mysql.com">MySQL RDBMS</a>.
@@ -90,9 +91,8 @@ public class MySQLAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
-
@Inject(Constants.RESOURCE_LOCATOR) ResourceLocator resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, valueObjectTypeRegistry);
// init defaults
this.storageEngine = DEFAULT_STORAGE_ENGINE;
@@ -102,6 +102,39 @@ public class MySQLAdapter extends JdbcAdapter {
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"BIGINT", "INT UNSIGNED",
"INTEGER UNSIGNED", "MEDIUMINT UNSIGNED"});
+ types.put(Types.BINARY, new String[]{"BINARY"});
+ types.put(Types.BIT, new String[]{"BIT"});
+ types.put(Types.BLOB, new String[]{"LONGBLOB"});
+ types.put(Types.BOOLEAN, new String[]{"BOOL"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"LONGTEXT"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INT", "INTEGER"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONGTEXT"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONGBLOB"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONGTEXT"});
+ types.put(Types.NCHAR, new String[]{"CHAR"});
+ types.put(Types.NCLOB, new String[]{"LONGTEXT"});
+ types.put(Types.NUMERIC, new String[]{"DECIMAL", "NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"VARCHAR"});
+ types.put(Types.REAL, new String[]{"DOUBLE", "REAL"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.SQLXML, new String[]{"LONGTEXT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"DATETIME", "TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"VARBINARY"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
@Override
protected QuotingStrategy createQuotingStrategy() {
return new DefaultQuotingStrategy("`", "`");
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
index d457f7da7..d82dc2565 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/oracle/OracleAdapter.java
@@ -42,7 +42,6 @@ import org.apache.cayenne.query.InsertBatchQuery;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
import org.apache.cayenne.query.UpdateBatchQuery;
-import org.apache.cayenne.resource.ResourceLocator;
import java.lang.reflect.Field;
import java.sql.CallableStatement;
@@ -51,7 +50,9 @@ import java.sql.ResultSet;
import java.sql.Types;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.oracle.com">Oracle RDBMS
@@ -165,14 +166,47 @@ public class OracleAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
-
@Inject(Constants.RESOURCE_LOCATOR) ResourceLocator resourceLocator,
@Inject
ValueObjectTypeRegistry valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes,
userExtendedTypes, extendedTypeFactories, valueObjectTypeRegistry);
// enable batch updates by default
setSupportsBatchUpdates(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"NUMBER"});
+ types.put(Types.BINARY, new String[]{"RAW"});
+ types.put(Types.BIT, new String[]{"INTEGER"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"INTEGER"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"NUMBER"});
+ types.put(Types.FLOAT, new String[]{"FLOAT"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.LONGNVARCHAR, new String[]{"NCLOB"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONG RAW"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONG VARCHAR"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.NCLOB, new String[]{"NCLOB"});
+ types.put(Types.NUMERIC, new String[]{"NUMBER"});
+ types.put(Types.NVARCHAR, new String[]{"NVARCHAR2"});
+ types.put(Types.REAL, new String[]{"NUMBER"});
+ types.put(Types.ROWID, new String[]{"ROWID"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.SQLXML, new String[]{"XMLType"});
+ types.put(Types.TIME, new String[]{"DATE"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"SMALLINT"});
+ types.put(Types.VARBINARY, new String[]{"RAW"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR2"});
+ return types;
+ }
+
/**
* @since 4.2
*/
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
index 897de4c20..af48db7d5 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/postgres/PostgresAdapter.java
@@ -41,13 +41,14 @@ import org.apache.cayenne.map.EntityResolver;
import org.apache.cayenne.query.ProcedureQuery;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.Types;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.postgresql.org">PostgreSQL
@@ -71,13 +72,46 @@ public class PostgresAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST)
List<ExtendedType> userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, resourceLocator, valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
setSupportsBatchUpdates(true);
setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"bigint", "bigserial"});
+ types.put(Types.BINARY, new String[]{"bytea"});
+ types.put(Types.BIT, new String[]{"boolean"});
+ types.put(Types.BLOB, new String[]{"oid"});
+ types.put(Types.BOOLEAN, new String[]{"boolean"});
+ types.put(Types.CHAR, new String[]{"character"});
+ types.put(Types.CLOB, new String[]{"text"});
+ types.put(Types.DATE, new String[]{"date"});
+ types.put(Types.DECIMAL, new String[]{"decimal"});
+ types.put(Types.DOUBLE, new String[]{"double precision"});
+ types.put(Types.FLOAT, new String[]{"float"});
+ types.put(Types.INTEGER, new String[]{"integer", "serial"});
+ types.put(Types.LONGNVARCHAR, new String[]{"text"});
+ types.put(Types.LONGVARBINARY, new String[]{"bytea"});
+ types.put(Types.LONGVARCHAR, new String[]{"text"});
+ types.put(Types.NCHAR, new String[]{"character"});
+ types.put(Types.NCLOB, new String[]{"text"});
+ types.put(Types.NUMERIC, new String[]{"numeric"});
+ types.put(Types.NVARCHAR, new String[]{"varchar"});
+ types.put(Types.OTHER, new String[]{"json"});
+ types.put(Types.REAL, new String[]{"real"});
+ types.put(Types.SMALLINT, new String[]{"smallint", "smallserial"});
+ types.put(Types.SQLXML, new String[]{"xml"});
+ types.put(Types.TIME, new String[]{"time"});
+ types.put(Types.TIMESTAMP, new String[]{"timestamp with time zone"});
+ types.put(Types.TINYINT, new String[]{"smallint"});
+ types.put(Types.VARBINARY, new String[]{"bytea"});
+ types.put(Types.VARCHAR, new String[]{"varchar"});
+ return types;
+ }
+
/**
* @since 4.2
*/
@@ -213,7 +247,7 @@ public class PostgresAdapter extends JdbcAdapter {
, ent.getFullyQualifiedName(), at.getName(), at.getType());
}
- // Checking that attribute is generated and we have alternative types
in types.xml.
+ // Checking that attribute is generated and we have alternative types
in the external types mapping.
// If so, use those autoincremented types. For example serial,
bigserial, smallserial.
String type = (at.isGenerated() && types.length > 1) ? types[1] :
types[0];
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
index 68e3f8905..b22ed5024 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/sqlite/SQLiteAdapter.java
@@ -33,12 +33,14 @@ import org.apache.cayenne.map.DbEntity;
import org.apache.cayenne.map.DbRelationship;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
+import java.sql.Types;
import java.util.Calendar;
import java.util.Collection;
import java.util.GregorianCalendar;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* A SQLite database adapter that works with Zentus JDBC driver. See
@@ -60,19 +62,56 @@ public class SQLiteAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST) List<ExtendedType>
defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST) List<ExtendedTypeFactory>
extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
super(
runtimeProperties,
defaultExtendedTypes,
userExtendedTypes,
extendedTypeFactories,
- resourceLocator,
valueObjectTypeRegistry);
this.setSupportsUniqueConstraints(false);
this.setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.ARRAY, new String[]{"ARRAY"});
+ types.put(Types.BIGINT, new String[]{"BIGINT"});
+ types.put(Types.BINARY, new String[]{"BINARY"});
+ types.put(Types.BIT, new String[]{"INTEGER"});
+ types.put(Types.BLOB, new String[]{"BLOB"});
+ types.put(Types.BOOLEAN, new String[]{"INTEGER"});
+ types.put(Types.CHAR, new String[]{"CHAR"});
+ types.put(Types.CLOB, new String[]{"CLOB"});
+ types.put(Types.DATALINK, new String[]{"DATALINK"});
+ types.put(Types.DATE, new String[]{"DATE"});
+ types.put(Types.DECIMAL, new String[]{"DECIMAL"});
+ types.put(Types.DOUBLE, new String[]{"DOUBLE"});
+ types.put(Types.FLOAT, new String[]{"REAL"});
+ types.put(Types.INTEGER, new String[]{"INTEGER"});
+ types.put(Types.JAVA_OBJECT, new String[]{"JAVA_OBJECT"});
+ types.put(Types.LONGNVARCHAR, new String[]{"LONGNVARCHAR"});
+ types.put(Types.LONGVARBINARY, new String[]{"LONGVARBINARY"});
+ types.put(Types.LONGVARCHAR, new String[]{"LONGVARCHAR"});
+ types.put(Types.NCHAR, new String[]{"NCHAR"});
+ types.put(Types.NCLOB, new String[]{"TEXT"});
+ types.put(Types.NUMERIC, new String[]{"NUMERIC"});
+ types.put(Types.NVARCHAR, new String[]{"NVARCHAR"});
+ types.put(Types.OTHER, new String[]{"OTHER"});
+ types.put(Types.REAL, new String[]{"REAL"});
+ types.put(Types.REF, new String[]{"REF"});
+ types.put(Types.SMALLINT, new String[]{"SMALLINT"});
+ types.put(Types.SQLXML, new String[]{"TEXT"});
+ types.put(Types.STRUCT, new String[]{"STRUCT"});
+ types.put(Types.TIME, new String[]{"TIME"});
+ types.put(Types.TIMESTAMP, new String[]{"TIMESTAMP"});
+ types.put(Types.TINYINT, new String[]{"TINYINT"});
+ types.put(Types.VARBINARY, new String[]{"VARBINARY"});
+ types.put(Types.VARCHAR, new String[]{"VARCHAR"});
+ return types;
+ }
+
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
super.configureExtendedTypes(map);
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
index f4af22cdf..496042f2a 100644
---
a/cayenne/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
+++
b/cayenne/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapter.java
@@ -43,12 +43,13 @@ import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.map.DbEntity;
import org.apache.cayenne.query.Query;
import org.apache.cayenne.query.SQLAction;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.PreparedStatement;
import java.sql.Types;
import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -108,14 +109,47 @@ public class SQLServerAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST)
List<ExtendedType> userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR)
ResourceLocator resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, resourceLocator, valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
this.setSupportsGeneratedKeys(true);
this.setSupportsBatchUpdates(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"bigint"});
+ types.put(Types.BINARY, new String[]{"binary"});
+ types.put(Types.BIT, new String[]{"bit"});
+ types.put(Types.BLOB, new String[]{"image"});
+ types.put(Types.BOOLEAN, new String[]{"bit"});
+ types.put(Types.CHAR, new String[]{"char"});
+ types.put(Types.CLOB, new String[]{"text"});
+ types.put(Types.DATE, new String[]{"date"});
+ types.put(Types.DECIMAL, new String[]{"decimal"});
+ types.put(Types.DOUBLE, new String[]{"double precision"});
+ types.put(Types.FLOAT, new String[]{"float"});
+ types.put(Types.INTEGER, new String[]{"int"});
+ types.put(Types.LONGNVARCHAR, new String[]{"ntext"});
+ types.put(Types.LONGVARBINARY, new String[]{"image"});
+ types.put(Types.LONGVARCHAR, new String[]{"text"});
+ types.put(Types.NCHAR, new String[]{"nchar"});
+ types.put(Types.NCLOB, new String[]{"ntext"});
+ types.put(Types.NUMERIC, new String[]{"numeric"});
+ types.put(Types.NVARCHAR, new String[]{"nvarchar"});
+ types.put(Types.REAL, new String[]{"real"});
+ types.put(Types.ROWID, new String[]{"ROWID"});
+ types.put(Types.SMALLINT, new String[]{"smallint"});
+ types.put(Types.SQLXML, new String[]{"xml"});
+ types.put(Types.TIME, new String[]{"time"});
+ types.put(Types.TIMESTAMP, new String[]{"datetime"});
+ types.put(Types.TINYINT, new String[]{"tinyint"});
+ types.put(Types.VARBINARY, new String[]{"varbinary"});
+ types.put(Types.VARCHAR, new String[]{"varchar"});
+ return types;
+ }
+
@Override
protected QuotingStrategy createQuotingStrategy() {
return new DefaultQuotingStrategy("[", "]");
diff --git
a/cayenne/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
b/cayenne/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
index 59eb79823..5e7c14cab 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/sybase/SybaseAdapter.java
@@ -37,11 +37,12 @@ import org.apache.cayenne.dba.JdbcAdapter;
import org.apache.cayenne.dba.QuotingStrategy;
import org.apache.cayenne.di.Inject;
import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.resource.ResourceLocator;
import java.sql.PreparedStatement;
import java.sql.Types;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* DbAdapter implementation for <a href="http://www.sybase.com">Sybase
RDBMS</a>.
@@ -52,13 +53,45 @@ public class SybaseAdapter extends JdbcAdapter {
@Inject(Constants.DEFAULT_TYPES_LIST)
List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.USER_TYPES_LIST) List<ExtendedType>
userExtendedTypes,
@Inject(Constants.TYPE_FACTORIES_LIST)
List<ExtendedTypeFactory> extendedTypeFactories,
- @Inject(Constants.RESOURCE_LOCATOR) ResourceLocator
resourceLocator,
@Inject ValueObjectTypeRegistry
valueObjectTypeRegistry) {
- super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, resourceLocator, valueObjectTypeRegistry);
+ super(runtimeProperties, defaultExtendedTypes, userExtendedTypes,
extendedTypeFactories, valueObjectTypeRegistry);
this.setSupportsGeneratedKeys(true);
}
+ @Override
+ protected Map<Integer, String[]> createExternalTypes() {
+ Map<Integer, String[]> types = new HashMap<>();
+ types.put(Types.BIGINT, new String[]{"decimal(19,0)"});
+ types.put(Types.BINARY, new String[]{"binary"});
+ types.put(Types.BIT, new String[]{"bit"});
+ types.put(Types.BLOB, new String[]{"image"});
+ types.put(Types.BOOLEAN, new String[]{"bit"});
+ types.put(Types.CHAR, new String[]{"char"});
+ types.put(Types.CLOB, new String[]{"text"});
+ types.put(Types.DATE, new String[]{"datetime"});
+ types.put(Types.DECIMAL, new String[]{"decimal"});
+ types.put(Types.DOUBLE, new String[]{"double precision"});
+ types.put(Types.FLOAT, new String[]{"float"});
+ types.put(Types.INTEGER, new String[]{"int"});
+ types.put(Types.LONGNVARCHAR, new String[]{"text"});
+ types.put(Types.LONGVARBINARY, new String[]{"image"});
+ types.put(Types.LONGVARCHAR, new String[]{"text"});
+ types.put(Types.NCHAR, new String[]{"nchar"});
+ types.put(Types.NCLOB, new String[]{"text"});
+ types.put(Types.NUMERIC, new String[]{"numeric"});
+ types.put(Types.NVARCHAR, new String[]{"nvarchar"});
+ types.put(Types.REAL, new String[]{"real"});
+ types.put(Types.SMALLINT, new String[]{"smallint"});
+ types.put(Types.SQLXML, new String[]{"text"});
+ types.put(Types.TIME, new String[]{"datetime"});
+ types.put(Types.TIMESTAMP, new String[]{"datetime"});
+ types.put(Types.TINYINT, new String[]{"tinyint"});
+ types.put(Types.VARBINARY, new String[]{"varbinary"});
+ types.put(Types.VARCHAR, new String[]{"varchar"});
+ return types;
+ }
+
@Override
protected QuotingStrategy createQuotingStrategy() {
return new DefaultQuotingStrategy("[", "]");
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/db2/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/db2/types.xml
deleted file mode 100644
index ea76c5114..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/db2/types.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-IBM DB2 types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="CHAR FOR BIT DATA"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="GRAPHIC"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="DBCLOB"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARCHAR FOR BIT DATA"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="VARGRAPHIC"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/derby/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/derby/types.xml
deleted file mode 100644
index 594b47679..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/derby/types.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-Derby types mapping
-
-Useful url:
-http://publib.boulder.ibm.com/infocenter/cldscp10/index.jsp?topic=/com.ibm.cloudscape.doc/sqlj207.htm
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="CHAR FOR BIT DATA"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE PRECISION"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="DOUBLE PRECISION"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONG VARCHAR FOR BIT DATA"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONG VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONG VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARCHAR FOR BIT DATA"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
-</types>
diff --git
a/cayenne/src/main/resources/org/apache/cayenne/dba/firebird/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/firebird/types.xml
deleted file mode 100644
index f54213a74..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/firebird/types.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-Firebird types mapping
-
-Useful url:
-http://db.apache.org/ddlutils/databases/firebird.html
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="SMALLINT"/> <!-- firebird doesn't support BOOLEAN type
so it is emulated with smallint -->
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="VARCHAR"/> <!-- LIKE operator doesn't work as expected
for CHAR type -->
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="CHAR CHARACTER SET UNICODE_FSS"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="BLOB SUB_TYPE TEXT"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="BLOB SUB_TYPE TEXT"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE PRECISION"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="DOUBLE PRECISION"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="BLOB SUB_TYPE TEXT"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="BLOB SUB_TYPE TEXT"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="VARCHAR CHARACTER SET UNICODE_FSS"/>
- </jdbc-type>
-</types>
diff --git
a/cayenne/src/main/resources/org/apache/cayenne/dba/frontbase/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/frontbase/types.xml
deleted file mode 100644
index 1d6d47b2f..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/frontbase/types.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-FrontBase types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY">
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="LONGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE PRECISION"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="CHAR VARYING"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="CHAR VARYING"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="INTERVAL"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="BIT VARYING"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="CHAR VARYING"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="CHAR VARYING"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/h2/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/h2/types.xml
deleted file mode 100644
index 16307c817..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/h2/types.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-H2 types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BINARY"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONGVARBINARY"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARBINARY"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="NVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="NCLOB"/>
- </jdbc-type>
-</types>
\ No newline at end of file
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/hsqldb/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/hsqldb/types.xml
deleted file mode 100644
index e96db6285..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/hsqldb/types.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-HSQLDB types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BINARY"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="LONGVARBINARY"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONGVARBINARY"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARBINARY"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/ingres/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/ingres/types.xml
deleted file mode 100644
index dd324ea10..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/ingres/types.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BYTE"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="LONG NVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONG BYTE"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONG VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONG NVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="BYTE VARYING"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="NVARCHAR"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/mysql/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/mysql/types.xml
deleted file mode 100644
index fd601e80a..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/mysql/types.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-MySQL types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY"/>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- <db-type name="INT UNSIGNED"/>
- <db-type name="INTEGER UNSIGNED"/>
- <db-type name="MEDIUMINT UNSIGNED"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BINARY"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="LONGBLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOL"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="LONGTEXT"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="LONGTEXT"/>
- </jdbc-type>
- <jdbc-type name="DATALINK"/>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INT"/>
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT"/>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONGBLOB"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONGTEXT"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONGTEXT"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="DECIMAL"/>
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER"/>
- <jdbc-type name="REAL">
- <db-type name="DOUBLE"/>
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF"/>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="DATETIME"/>
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARBINARY"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="LONGTEXT"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/oracle/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/oracle/types.xml
deleted file mode 100644
index d17ab2b2a..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/oracle/types.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-Oracle types mapping
--->
-
-<types>
- <jdbc-type name="ARRAY"/>
- <jdbc-type name="ROWID">
- <db-type name="ROWID"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="NUMBER"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="RAW"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK"/>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="NUMBER"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT"/>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONG RAW"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONG VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMBER"/>
- </jdbc-type>
- <jdbc-type name="OTHER"/>
- <jdbc-type name="REAL">
- <db-type name="NUMBER"/>
- </jdbc-type>
- <jdbc-type name="REF"/>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="RAW"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR2"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="NVARCHAR2"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="XMLType"/>
- </jdbc-type>
-</types>
diff --git
a/cayenne/src/main/resources/org/apache/cayenne/dba/postgres/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/postgres/types.xml
deleted file mode 100644
index bb886aaf2..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/postgres/types.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-Broken PostgreSQL types mapping.
--->
-
-<types>
- <jdbc-type name="ARRAY"/>
- <jdbc-type name="BIGINT">
- <db-type name="bigint"/>
- <db-type name="bigserial"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="bytea"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <!-- PostgreSQL BIT is a "bit string", so mapping it as boolean
seems more appropriate -->
- <db-type name="boolean"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="oid"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="boolean"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="character"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="character"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="DATALINK"/>
- <jdbc-type name="DATE">
- <db-type name="date"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="decimal"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="double precision"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="float"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="integer"/>
- <db-type name="serial"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT"/>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="bytea"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="numeric"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="json"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="real"/>
- </jdbc-type>
- <jdbc-type name="REF"/>
- <jdbc-type name="SMALLINT">
- <db-type name="smallint"/>
- <db-type name="smallserial"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="time"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="timestamp with time zone"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="smallint"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="bytea"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="varchar"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="varchar"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="xml"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/sqlite/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/sqlite/types.xml
deleted file mode 100644
index d3ddd1ba5..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/sqlite/types.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-SQLite types mapping.
-
-Types is something really fuzzy in SQLite:
-http://sqlite.org/datatype3.html
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BINARY"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="TEXT"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONGVARBINARY"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONGNVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARBINARY"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="NVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="TEXT"/>
- </jdbc-type>
-</types>
diff --git
a/cayenne/src/main/resources/org/apache/cayenne/dba/sqlserver/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/sqlserver/types.xml
deleted file mode 100644
index e383b1b5d..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/sqlserver/types.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!-- MS SQL Server types mapping. -->
-
-<types>
- <jdbc-type name="ARRAY"/>
- <jdbc-type name="BIGINT">
- <db-type name="bigint"/>
- </jdbc-type>
- <jdbc-type name="ROWID">
- <db-type name="ROWID"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="binary"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="bit"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="image"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="bit"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="char"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="nchar"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="ntext"/>
- </jdbc-type>
- <jdbc-type name="DATALINK"/>
- <jdbc-type name="DATE">
- <db-type name="date"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="decimal"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="double precision"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="float"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="int"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT"/>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="image"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="ntext"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="numeric"/>
- </jdbc-type>
- <jdbc-type name="OTHER"/>
- <jdbc-type name="REAL">
- <db-type name="real"/>
- </jdbc-type>
- <jdbc-type name="REF"/>
- <jdbc-type name="SMALLINT">
- <db-type name="smallint"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="time"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="datetime"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="tinyint"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="varbinary"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="varchar"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="nvarchar"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="xml"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/sybase/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/sybase/types.xml
deleted file mode 100644
index 134f0bbe7..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/sybase/types.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!-- Sybase types mapping. -->
-
-<types>
- <jdbc-type name="ARRAY"/>
- <jdbc-type name="BIGINT">
- <!-- Sybase only introduces bigint in v.15; v.12 requires a
workaround -->
- <db-type name="decimal(19,0)"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="binary"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="bit"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="image"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="bit"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="char"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="nchar"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="DATALINK"/>
- <jdbc-type name="DATE">
- <db-type name="datetime"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="decimal"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="double precision"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="float"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="int"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT"/>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="image"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="text"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="numeric"/>
- </jdbc-type>
- <jdbc-type name="OTHER"/>
- <jdbc-type name="REAL">
- <db-type name="real"/>
- </jdbc-type>
- <jdbc-type name="REF"/>
- <jdbc-type name="SMALLINT">
- <db-type name="smallint"/>
- </jdbc-type>
- <jdbc-type name="STRUCT"/>
- <jdbc-type name="TIME">
- <db-type name="datetime"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="datetime"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="tinyint"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="varbinary"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="varchar"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="nvarchar"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="text"/>
- </jdbc-type>
-</types>
diff --git a/cayenne/src/main/resources/org/apache/cayenne/dba/types.xml
b/cayenne/src/main/resources/org/apache/cayenne/dba/types.xml
deleted file mode 100644
index b2f5c6162..000000000
--- a/cayenne/src/main/resources/org/apache/cayenne/dba/types.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!--
-This file specifies database types mapping to JDBC types.
-To create mapping for your own adapter, put a similar file
-with your mapping in the adapter Java package directory.
-File must be called "types.xml".
--->
-
-<types>
- <jdbc-type name="ARRAY">
- <db-type name="ARRAY"/>
- </jdbc-type>
- <jdbc-type name="BIGINT">
- <db-type name="BIGINT"/>
- </jdbc-type>
- <jdbc-type name="ROWID">
- <db-type name="ROWID"/>
- </jdbc-type>
- <jdbc-type name="BINARY">
- <db-type name="BINARY"/>
- </jdbc-type>
- <jdbc-type name="BIT">
- <db-type name="BIT"/>
- </jdbc-type>
- <jdbc-type name="BLOB">
- <db-type name="BLOB"/>
- </jdbc-type>
- <jdbc-type name="BOOLEAN">
- <db-type name="BOOLEAN"/>
- </jdbc-type>
- <jdbc-type name="CHAR">
- <db-type name="CHAR"/>
- </jdbc-type>
- <jdbc-type name="NCHAR">
- <db-type name="NCHAR"/>
- </jdbc-type>
- <jdbc-type name="CLOB">
- <db-type name="CLOB"/>
- </jdbc-type>
- <jdbc-type name="NCLOB">
- <db-type name="NCLOB"/>
- </jdbc-type>
- <jdbc-type name="DATALINK">
- <db-type name="DATALINK"/>
- </jdbc-type>
- <jdbc-type name="DATE">
- <db-type name="DATE"/>
- </jdbc-type>
- <jdbc-type name="DECIMAL">
- <db-type name="DECIMAL"/>
- </jdbc-type>
- <jdbc-type name="DOUBLE">
- <db-type name="DOUBLE"/>
- </jdbc-type>
- <jdbc-type name="FLOAT">
- <db-type name="FLOAT"/>
- </jdbc-type>
- <jdbc-type name="INTEGER">
- <db-type name="INTEGER"/>
- </jdbc-type>
- <jdbc-type name="JAVA_OBJECT">
- <db-type name="JAVA_OBJECT"/>
- </jdbc-type>
- <jdbc-type name="LONGVARBINARY">
- <db-type name="LONGVARBINARY"/>
- </jdbc-type>
- <jdbc-type name="LONGVARCHAR">
- <db-type name="LONGVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="LONGNVARCHAR">
- <db-type name="LONGNVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NUMERIC">
- <db-type name="NUMERIC"/>
- </jdbc-type>
- <jdbc-type name="OTHER">
- <db-type name="OTHER"/>
- </jdbc-type>
- <jdbc-type name="REAL">
- <db-type name="REAL"/>
- </jdbc-type>
- <jdbc-type name="REF">
- <db-type name="REF"/>
- </jdbc-type>
- <jdbc-type name="SMALLINT">
- <db-type name="SMALLINT"/>
- </jdbc-type>
- <jdbc-type name="STRUCT">
- <db-type name="STRUCT"/>
- </jdbc-type>
- <jdbc-type name="TIME">
- <db-type name="TIME"/>
- </jdbc-type>
- <jdbc-type name="TIMESTAMP">
- <db-type name="TIMESTAMP"/>
- </jdbc-type>
- <jdbc-type name="TINYINT">
- <db-type name="TINYINT"/>
- </jdbc-type>
- <jdbc-type name="VARBINARY">
- <db-type name="VARBINARY"/>
- </jdbc-type>
- <jdbc-type name="VARCHAR">
- <db-type name="VARCHAR"/>
- </jdbc-type>
- <jdbc-type name="NVARCHAR">
- <db-type name="NVARCHAR"/>
- </jdbc-type>
- <jdbc-type name="SQLXML">
- <db-type name="SQLXML"/>
- </jdbc-type>
-</types>
diff --git
a/cayenne/src/test/java/org/apache/cayenne/configuration/runtime/DataDomainProviderTest.java
b/cayenne/src/test/java/org/apache/cayenne/configuration/runtime/DataDomainProviderTest.java
index 691d2f839..95831d1b2 100644
---
a/cayenne/src/test/java/org/apache/cayenne/configuration/runtime/DataDomainProviderTest.java
+++
b/cayenne/src/test/java/org/apache/cayenne/configuration/runtime/DataDomainProviderTest.java
@@ -210,12 +210,6 @@ public class DataDomainProviderTest {
final ResourceLocator locator = new
ClassLoaderResourceLocator(classLoaderManager) {
public Collection<Resource> findResources(String name) {
- // ResourceLocator also used by JdbcAdapter to locate
types.xml...
- // if this is the request we are getting, just let it go
through..
- if (name.endsWith("types.xml")) {
- return super.findResources(name);
- }
-
assertEquals(testConfigName, name);
return Collections.<Resource>singleton(new MockResource());
}