Skip to content

Commit

Permalink
JDBC-212 Remove ClassFactory, GDSObjectFactory and FBStatementFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Aug 7, 2012
1 parent 358e024 commit a170aa1
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 313 deletions.
70 changes: 0 additions & 70 deletions src/main/org/firebirdsql/gds/ClassFactory.java

This file was deleted.

55 changes: 0 additions & 55 deletions src/main/org/firebirdsql/gds/GDSObjectFactory.java

This file was deleted.

@@ -1,9 +1,9 @@
package org.firebirdsql.gds.impl.jni;

import org.firebirdsql.gds.ClassFactory;
import org.firebirdsql.gds.GDS;
import org.firebirdsql.gds.GDSException;
import org.firebirdsql.gds.impl.GDSFactoryPlugin;
import org.firebirdsql.jdbc.FBConnection;

public class EmbeddedGDSFactoryPlugin implements GDSFactoryPlugin {

Expand All @@ -28,7 +28,7 @@ public String[] getTypeAliases() {
}

public Class getConnectionClass() {
return ClassFactory.get(ClassFactory.FBConnection);
return FBConnection.class;
}

public String[] getSupportedProtocols() {
Expand Down
@@ -1,9 +1,9 @@
package org.firebirdsql.gds.impl.jni;

import org.firebirdsql.gds.ClassFactory;
import org.firebirdsql.gds.GDS;
import org.firebirdsql.gds.GDSException;
import org.firebirdsql.gds.impl.GDSFactoryPlugin;
import org.firebirdsql.jdbc.FBConnection;


public class LocalGDSFactoryPlugin implements GDSFactoryPlugin {
Expand All @@ -27,7 +27,7 @@ public String[] getTypeAliases() {
}

public Class getConnectionClass() {
return ClassFactory.get(ClassFactory.FBConnection);
return FBConnection.class;
}

public String[] getSupportedProtocols() {
Expand Down
@@ -1,10 +1,9 @@
package org.firebirdsql.gds.impl.jni;

import org.firebirdsql.gds.ClassFactory;
import org.firebirdsql.gds.GDS;
import org.firebirdsql.gds.GDSException;
import org.firebirdsql.gds.impl.GDSFactoryPlugin;

import org.firebirdsql.jdbc.FBConnection;

public class NativeGDSFactoryPlugin implements GDSFactoryPlugin {

Expand All @@ -26,7 +25,7 @@ public String[] getTypeAliases() {
}

public Class getConnectionClass() {
return ClassFactory.get(ClassFactory.FBConnection);
return FBConnection.class;
}

public String[] getSupportedProtocols() {
Expand Down
@@ -1,10 +1,9 @@
package org.firebirdsql.gds.impl.wire;

import org.firebirdsql.gds.ClassFactory;
import org.firebirdsql.gds.GDS;
import org.firebirdsql.gds.GDSException;
import org.firebirdsql.gds.GDSObjectFactory;
import org.firebirdsql.gds.impl.GDSFactoryPlugin;
import org.firebirdsql.jdbc.FBConnection;

public class WireGDSFactoryPlugin implements GDSFactoryPlugin {

Expand All @@ -26,7 +25,7 @@ public String[] getTypeAliases() {
}

public Class getConnectionClass() {
return ClassFactory.get(ClassFactory.FBConnection);
return FBConnection.class;
}

public String[] getSupportedProtocols() {
Expand All @@ -35,7 +34,7 @@ public String[] getSupportedProtocols() {

public GDS getGDS() {
if (gdsImpl == null)
gdsImpl = GDSObjectFactory.createJavaGDSImpl();
gdsImpl = new JavaGDSImpl();

return gdsImpl;
}
Expand Down
11 changes: 5 additions & 6 deletions src/main/org/firebirdsql/jdbc/AbstractConnection.java
Expand Up @@ -844,8 +844,8 @@ public synchronized Statement createStatement(int resultSetType,
checkHoldability(resultSetType, resultSetHoldability);

try {
Statement stmt = FBStatementFactory.createStatement(getGDSHelper(), resultSetType,
resultSetConcurrency, resultSetHoldability, txCoordinator);
Statement stmt = new FBStatement(getGDSHelper(), resultSetType, resultSetConcurrency,
resultSetHoldability, txCoordinator);

activeStatements.add(stmt);
return stmt;
Expand Down Expand Up @@ -1185,7 +1185,7 @@ protected synchronized PreparedStatement prepareStatement(String sql,
else
blobCoordinator = txCoordinator;

stmt = FBStatementFactory.createPreparedStatement(
stmt = new FBPreparedStatement(
getGDSHelper(), sql, resultSetType, resultSetConcurrency,
resultSetHoldability, coordinator, blobCoordinator,
metaData, false, generatedKeys);
Expand Down Expand Up @@ -1231,8 +1231,7 @@ public synchronized CallableStatement prepareCall(String sql,
resultSetType = ResultSet.TYPE_SCROLL_INSENSITIVE;
}

if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE)
{
if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE) {
addWarning(new FBSQLWarning("Scroll-sensitive result sets are not supported."));
resultSetType = ResultSet.TYPE_SCROLL_INSENSITIVE;
}
Expand All @@ -1250,7 +1249,7 @@ public synchronized CallableStatement prepareCall(String sql,
}

try {
stmt = FBStatementFactory.createCallableStatement(getGDSHelper(), sql, resultSetType,
stmt = new FBCallableStatement(getGDSHelper(), sql, resultSetType,
resultSetConcurrency, resultSetHoldability, storedProcedureMetaData, txCoordinator, txCoordinator);
activeStatements.add(stmt);

Expand Down
Expand Up @@ -6232,7 +6232,7 @@ private AbstractPreparedStatement getStatement(String sql) throws SQLException {
InternalTransactionCoordinator.MetaDataTransactionCoordinator metaDataTransactionCoordinator =
new InternalTransactionCoordinator.MetaDataTransactionCoordinator();

s = FBStatementFactory.createPreparedStatement(gdsHelper, sql,
s = new FBPreparedStatement(gdsHelper, sql,
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY,
ResultSet.CLOSE_CURSORS_AT_COMMIT,
metaDataTransactionCoordinator, metaDataTransactionCoordinator,
Expand Down

0 comments on commit a170aa1

Please sign in to comment.