cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [03/30] cayenne git commit: CAY-2377. Changes in org.apache.cayenne.dba
Date Thu, 07 Dec 2017 10:09:32 GMT
CAY-2377. Changes in org.apache.cayenne.dba


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/7c09e7f2
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/7c09e7f2
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/7c09e7f2

Branch: refs/heads/master
Commit: 7c09e7f25d763a23367defa7145a8a745c7cc13d
Parents: cb1ed5d
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Wed Oct 25 11:53:40 2017 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Wed Nov 15 10:27:46 2017 +0300

----------------------------------------------------------------------
 .../cayenne/datasource/DriverDataSource.java    | 53 --------------------
 .../org/apache/cayenne/dba/AutoAdapter.java     |  9 ----
 .../java/org/apache/cayenne/dba/DbAdapter.java  |  7 ---
 .../cayenne/dba/DefaultQuotingStrategy.java     | 15 ------
 .../org/apache/cayenne/dba/JdbcAdapter.java     |  9 ----
 .../org/apache/cayenne/dba/QuotingStrategy.java | 15 ------
 docs/doc/src/main/resources/UPGRADE.txt         | 12 +++++
 7 files changed, 12 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java
b/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java
index 9d999eb..b5ccc5a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/datasource/DriverDataSource.java
@@ -47,59 +47,6 @@ public class DriverDataSource implements DataSource {
 	protected String password;
 
 	/**
-	 * Loads JDBC driver using current thread class loader.
-	 * 
-	 * @since 3.0
-	 * @deprecated since 4.0 as class loading should not happen here.
-	 */
-	@Deprecated
-	private static Driver loadDriver(String driverClassName) {
-
-		Class<?> driverClass;
-		try {
-			driverClass = Util.getJavaClass(driverClassName);
-		} catch (Exception ex) {
-			throw new CayenneRuntimeException("Can not load JDBC driver named '%s': %s", driverClassName,
ex.getMessage());
-		}
-
-		try {
-			return (Driver) driverClass.newInstance();
-		} catch (Exception ex) {
-			throw new CayenneRuntimeException("Error instantiating driver '%s': %s", driverClassName,
ex.getMessage());
-		}
-	}
-
-	/**
-	 * Creates a new DriverDataSource. If "driverClassName" is null,
-	 * DriverDataSource will consult DriverManager for a registered driver for
-	 * the given URL. So when specifying null, a user must take care of
-	 * registering the driver. "connectionUrl" on the other hand must NOT be
-	 * null.
-	 * 
-	 * @deprecated since 4.0 as class loading should not happen here. Use {
-	 *             {@link #DriverDataSource(Driver, String, String, String)}.
-	 */
-	@Deprecated
-	public DriverDataSource(String driverClassName, String connectionUrl) {
-		this(driverClassName, connectionUrl, null, null);
-	}
-
-	/**
-	 * Creates a new DriverDataSource. If "driverClassName" is null,
-	 * DriverDataSource will consult DriverManager for a registered driver for
-	 * the given URL. So when specifying null, a user must take care of
-	 * registering the driver. "connectionUrl" on the other hand must NOT be
-	 * null.
-	 * 
-	 * @deprecated since 4.0 as class loading should not happen here. Use
-	 *             {@link #DriverDataSource(Driver, String, String, String)}.
-	 */
-	@Deprecated
-	public DriverDataSource(String driverClassName, String connectionUrl, String userName, String
password) {
-		this(loadDriver(driverClassName), connectionUrl, userName, password);
-	}
-
-	/**
 	 * Creates a DriverDataSource wrapping a given Driver. If "driver" is null,
 	 * DriverDataSource will consult DriverManager for a registered driver for
 	 * the given URL. So when specifying null, a user must take care of

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/dba/AutoAdapter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/AutoAdapter.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/AutoAdapter.java
index cb436e6..44f1b25 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/AutoAdapter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/AutoAdapter.java
@@ -220,15 +220,6 @@ public class AutoAdapter implements DbAdapter {
 	}
 
 	/**
-	 * @deprecated since 4.0
-	 */
-	@Deprecated
-	@Override
-	public QuotingStrategy getQuotingStrategy(boolean isQuoteStrategy) {
-		return getAdapter().getQuotingStrategy(isQuoteStrategy);
-	}
-
-	/**
 	 * @since 4.0
 	 */
 	@Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/dba/DbAdapter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/DbAdapter.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/DbAdapter.java
index e89ae4b..12d4f9a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/DbAdapter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/DbAdapter.java
@@ -194,13 +194,6 @@ public interface DbAdapter {
 	void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column);
 
 	/**
-	 * @since 3.0
-	 * @deprecated since 4.0 use {@link #getQuotingStrategy()}.
-	 */
-	@Deprecated
-	QuotingStrategy getQuotingStrategy(boolean needQuotes);
-
-	/**
 	 * Returns SQL identifier quoting strategy object
 	 *
 	 * @since 4.0

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
b/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
index 1019f7b..93ccdcb 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/DefaultQuotingStrategy.java
@@ -37,21 +37,6 @@ public class DefaultQuotingStrategy implements QuotingStrategy {
         this.endQuote = endQuote;
     }
 
-    /**
-     * @deprecated since 4.0
-     */
-    @Override
-    @Deprecated
-    public String quoteString(String name) {
-        return quotedIdentifier((DataMap) null, name);
-    }
-
-    @Override
-    @Deprecated
-    public String quoteFullyQualifiedName(DbEntity entity) {
-        return quotedFullyQualifiedName(entity);
-    }
-
     @Override
     public String quotedFullyQualifiedName(DbEntity entity) {
         return quotedIdentifier(entity.getDataMap(), entity.getCatalog(), entity.getSchema(),
entity.getName());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
index b8138fb..f4b0a1c 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
@@ -610,15 +610,6 @@ public class JdbcAdapter implements DbAdapter {
 	}
 
 	/**
-	 * @since 3.0
-	 * @deprecated since 4.0 use {@link #getQuotingStrategy()}.
-	 */
-	@Deprecated
-	public QuotingStrategy getQuotingStrategy(boolean needQuotes) {
-		return getQuotingStrategy();
-	}
-
-	/**
 	 * @since 4.0
 	 */
 	public QuotingStrategy getQuotingStrategy() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/cayenne-server/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
index 0b004f5..a94dd72 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
@@ -30,21 +30,6 @@ import org.apache.cayenne.map.Entity;
 public interface QuotingStrategy {
 
     /**
-     * Returns a properly quoted identifier.
-     * 
-     * @deprecated since 4.0
-     */
-    @Deprecated
-    String quoteString(String identifier);
-
-    /**
-     * @deprecated since 4.0 renamed to
-     *             {@link #quotedFullyQualifiedName(DbEntity)}.
-     */
-    @Deprecated
-    String quoteFullyQualifiedName(DbEntity entity);
-
-    /**
      * Builds a fully qualified name from catalog, schema, name parts of
      * DbEntity, inclosing them in quotations according to this strategy
      * algorithm. Analog of "quotedIdentifier(entity.getCatalog(),

http://git-wip-us.apache.org/repos/asf/cayenne/blob/7c09e7f2/docs/doc/src/main/resources/UPGRADE.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt
index 30de007..1da0c9c 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -127,6 +127,18 @@ UPGRADING TO 4.1.M2
       - removed void sqlLiteralForObject(StringBuilder buffer, Object object); {his should
go away once we can remove 4.0 deprecated API. The actual logic for printing a value is now
       spread around the ExtendedTypes} in org.apache.cayenne.log.Slf4jJdbcEventLogger;
       - removed test void testSqlLiteralForObject() in org.apache.cayenne.log;
+      - removed QuotingStrategy getQuotingStrategy(boolean needQuotes); {since 4.0 use getQuotingStrategy()}
in org.apache.cayenne.dba.DbAdapter;
+      - removed QuotingStrategy getQuotingStrategy(boolean isQuoteStrategy) in org.apache.cayenne.dba.AutoAdapter
and org.apache.cayenne.dba.JdbcAdapter;
+      - removed String quoteFullyQualifiedName(DbEntity entity); {since 4.0 renamed to quotedFullyQualifiedName(DbEntity)}
in org.apache.cayenne.dba.QuotingStrategy;
+      - removed String quoteFullyQualifiedName(DbEntity entity); in org.apache.cayenne.dba.DefaultQuotingStrategy;
+      - removed String quoteString(String identifier); in org.apache.cayenne.dba.QuotingStrategy;
+      - removed String quoteString(String name); in org.apache.cayenne.dba.DefaultQuotingStrategy;
+      - removed DriverDataSource(String driverClassName, String connectionUrl) {since 4.0
as class loading should not happen here. Use DriverDataSource(Driver, String, String, String)}
+      in org.apache.cayenne.datasource.DriverDataSource;
+      - removed DriverDataSource(String driverClassName, String connectionUrl, String userName,
String password) {since 4.0 as class loading should not happen here.
+      Use DriverDataSource(Driver, String, String, String)} in org.apache.cayenne.datasource.DriverDataSource;
+      - removed static Driver loadDriver(String driverClassName) {since 4.0 as class loading
should not happen here} in org.apache.cayenne.datasource.DriverDataSource;
+
 
 UPGRADING TO 4.1.M1
 


Mime
View raw message