DRILL-2089: Split JDBC implementation out of org.apache.drill.jdbc. (Combined patch.)
**********
DRILL-2089: Part 1--Pre-move preparation and code hygiene.
Preparation for moving classes:
- Added missed "public" to JdbcApiSqlException and InvalidCursorStateSqlException.
Code hygiene:
- Fixed commented-out constructors. [AlreadyClosedSqlException]
- Fixed missed re-alignment. [DrillConnectionImpl]
- Fixed basic whitespace. [Driver]
- Fixed/augmented/added various doc. comments.
- Added @Override annotations. [MetaImpl, DrillJdbc41Factory]
- Purged an unused import. [DrillJdbc41Factory]
**********
DRILL-2089: Part 2--Split Driver into published Driver and internal DriverImpl.
Split original Driver class into new Driver and DriverImpl classes (to remove
implementation details from JDBC's published interface (i.e., extension of
Avatica UnregisteredDriver)):
- Moved most of original Driver to new DriverImpl. (Excluded registration code.)
- Created new Driver class:
- implementing java.sql.Driver (not extending Avatica UnregisteredDriver)
- providing java.sql.Driver methods via delegation to a private DriverImpl
instance (not via extension)
- having driver registration code
- Updated internal references to Driver to DriverImpl. [DrillConnectionImpl,
DrillFactory, and DrillJdbc41Factory]
2089: MOVED static initialization up. [Driver]
**********
DRILL-2089: Part 3--Move files. (Move _only_--no edits (e.g., package renaming).)
Moved files from exec/jdbc/src/main/java/org/apache/drill/jdbc/
to exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/:
- AvaticaDrillSqlAccessor.java
- BasicList.java
- DrillAccessorList.java
- DrillColumnMetaDataList.java
- DrillConnectionImpl.java
- DrillCursor.java
- DrillDatabaseMetaData.java
- DrillFactory.java
- DrillHandler.java
- DrillJdbc40Factory.java
- DrillJdbc41Factory.java
- DrillPrepareResult.java
- DrillPreparedStatement.java
- DrillRemoteStatement.java
- DrillStatementRegistry.java
- DriverImpl.java
- GlobalServiceSetReference.java
- MetaImpl.java
**********
DRILL-2089: Part 4--Update package names of moved classes.
Updated package names of moved classes:
- In own package declaration.
- In references in imports.
- In references in string literals. [DriverImpl]
- In ProGuard configuration for JDBC-all Jar file.
- Also added DrillConnection and DrillStatement to parallel recent addition
of DrillResultSet.
**********
DRILL-2089: Part 5--Reduce excess visibility (remove (now-)unneeded "public").
Purged interim "public" from earlier partial DRILL-2089 fixes.
Purged other "public" qualifiers no longer needed.
**********
DRILL-2089: Part 6--Rename DrillPreparedStatement to ...Impl. [various]
**********
DRILL-2089: Part 7--Post-move hygiene (simplification, renaming, whitespace).
Fixed "cleanup()" to "cleanUp()". [DrillRemoteStatement,
DrillPreparedStatement, DrillStatementImpl, DrillHandler]
Renamed DrillConnection.config() to more conventional getConfig().
[DrillConnection, DrillConnectionImpl]
Removed now-unneeded "abstract" and eliminated now-unneeded subclasses.
[DrillConnectionImpl, DrillStatementImpl, DrillJdbc41Factory]
Simplified boolean Driver.load() to void. [Driver]
- Switched from "new Driver()" to "Driver.load()" in one case. [ConnectionTest]
Fixed "Optiq" -> "Drill", cleaned up createDriverVersion. [DriverImpl]
Adjusted unknown-case handling, logging. [DrillColumnMetaDataList]
Wrapped lines; adjusted other whitespace.