Skip to content

Commit

Permalink
Make designer compatible with java 7
Browse files Browse the repository at this point in the history
* Addition of methods in interfaces. Whether these method will be
  internally used remains to be seen.
  • Loading branch information
Paul Richardson committed Jan 28, 2013
1 parent 987a38a commit 5b4d073
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement;
Expand Down Expand Up @@ -1616,4 +1617,14 @@ public <T> T unwrap( Class<T> iface ) {

return null;
}

public <T> T getObject(int columnIndex,
Class<T> type) throws SQLException {
return null;
}

public <T> T getObject(String columnLabel,
Class<T> type) throws SQLException {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Savepoint;
Expand All @@ -24,7 +26,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import java.util.concurrent.Executor;
import org.teiid.designer.modelgenerator.xml.wizards.StateManager;
import org.teiid.designer.schema.tools.processing.RelationshipProcessor;

Expand Down Expand Up @@ -479,4 +481,24 @@ public <T> T unwrap( Class<T> iface ) {
return null;
}

public void setSchema(String schema) throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public String getSchema() throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public void abort(Executor executor) throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public int getNetworkTimeout() throws SQLException {
throw new SQLFeatureNotSupportedException();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.io.Writer;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -1495,4 +1497,15 @@ protected void catalogsChanged() {
public Map getNamespacePrefixes( String name ) {
return schemaModel.getNamespacePrefixes();
}

public ResultSet getPseudoColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern) throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public boolean generatedKeyAlwaysReturned() throws SQLException {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement;
Expand Down Expand Up @@ -1937,4 +1938,12 @@ public <T> T unwrap( Class<T> iface ) {

return null;
}

public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
throw new SQLFeatureNotSupportedException();
}

public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.sql.Struct;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;

/**
* FakeConnection
Expand Down Expand Up @@ -573,4 +574,22 @@ public boolean isWrapperFor( Class<?> iface ) {
public <T> T unwrap( Class<T> iface ) {
return null;
}

public void setSchema(String schema) throws SQLException {
}

public String getSchema() throws SQLException {
return null;
}

public void abort(Executor executor) throws SQLException {
}

public void setNetworkTimeout(Executor executor,
int milliseconds) throws SQLException {
}

public int getNetworkTimeout() throws SQLException {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.RowIdLifetime;
import java.sql.SQLException;

/**
* FakeDatabaseMetaData
Expand Down Expand Up @@ -1470,4 +1471,15 @@ public <T> T unwrap( Class<T> iface ) {
return null;
}

public ResultSet getPseudoColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern) throws SQLException {
return null;
}

public boolean generatedKeyAlwaysReturned() throws SQLException {
return false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement;
Expand Down Expand Up @@ -1541,5 +1542,15 @@ public <T> T unwrap( Class<T> iface ) {

return null;
}

public <T> T getObject(int columnIndex,
Class<T> type) throws SQLException {
return null;
}

public <T> T getObject(String columnLabel,
Class<T> type) throws SQLException {
return null;
}

}

0 comments on commit 5b4d073

Please sign in to comment.