• R/O
  • SSH
  • HTTPS

relations: コミット


コミットメタ情報

リビジョン37 (tree)
日時2014-09-19 15:40:57
作者y-moriguchi

ログメッセージ

Java SE 7 support

変更サマリ

差分

--- relations/src/net/morilib/db/jdbc/RelationsStatement.java (revision 36)
+++ relations/src/net/morilib/db/jdbc/RelationsStatement.java (revision 37)
@@ -404,4 +404,16 @@
404404 return false;
405405 }
406406
407+ @Override
408+ public void closeOnCompletion() throws SQLException {
409+ logger.finer("closeOnCompletion");
410+ // ignore it
411+ }
412+
413+ @Override
414+ public boolean isCloseOnCompletion() throws SQLException {
415+ logger.finer("isCloseOnCompletion");
416+ return false;
417+ }
418+
407419 }
--- relations/src/net/morilib/db/jdbc/RelationsDatabaseMetadata.java (revision 36)
+++ relations/src/net/morilib/db/jdbc/RelationsDatabaseMetadata.java (revision 37)
@@ -1332,4 +1332,31 @@
13321332 "SPECIFIC_NAME");
13331333 }
13341334
1335+ @Override
1336+ public ResultSet getPseudoColumns(String catalog,
1337+ String schemaPattern, String tableNamePattern,
1338+ String columnNamePattern)
1339+ throws SQLException {
1340+ logger.finer("getPseudoColumns");
1341+ return new NullResultSet(
1342+ "TABLE_CAT",
1343+ "TABLE_SCHEM",
1344+ "TABLE_NAME",
1345+ "COLUMN_NAME",
1346+ "DATA_TYPE",
1347+ "COLUMN_SIZE",
1348+ "DECIMAL_DIGITS",
1349+ "NUM_PREC_RADIX",
1350+ "COLUMN_USAGE",
1351+ "REMARKS",
1352+ "CHAR_OCTET_LENGTH",
1353+ "IS_NULLABLE");
1354+ }
1355+
1356+ @Override
1357+ public boolean generatedKeyAlwaysReturned() throws SQLException {
1358+ logger.finer("generatedKeyAlwaysReturned");
1359+ return false;
1360+ }
1361+
13351362 }
--- relations/src/net/morilib/db/jdbc/RelationsDriver.java (revision 36)
+++ relations/src/net/morilib/db/jdbc/RelationsDriver.java (revision 37)
@@ -5,7 +5,9 @@
55 import java.sql.Driver;
66 import java.sql.DriverPropertyInfo;
77 import java.sql.SQLException;
8+import java.sql.SQLFeatureNotSupportedException;
89 import java.util.Properties;
10+import java.util.logging.Logger;
911
1012 import net.morilib.db.schema.SqlSchema;
1113 import net.morilib.db.schema.SqlSchemaFactory;
@@ -64,4 +66,9 @@
6466 return false;
6567 }
6668
69+ @Override
70+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
71+ throw new SQLFeatureNotSupportedException();
72+ }
73+
6774 }
--- relations/src/net/morilib/db/jdbc/UnupdatableResultSet.java (revision 36)
+++ relations/src/net/morilib/db/jdbc/UnupdatableResultSet.java (revision 37)
@@ -526,4 +526,34 @@
526526 throw new SQLFeatureNotSupportedException();
527527 }
528528
529+ @SuppressWarnings("unchecked")
530+ @Override
531+ public<T> T getObject(int columnIndex,
532+ Class<T> type) throws SQLException {
533+ if(type == null) {
534+ throw new SQLException();
535+ } else {
536+ try {
537+ return (T)getObject(columnIndex);
538+ } catch(ClassCastException e) {
539+ throw new SQLException(e);
540+ }
541+ }
542+ }
543+
544+ @SuppressWarnings("unchecked")
545+ @Override
546+ public<T> T getObject(String columnLabel,
547+ Class<T> type)throws SQLException {
548+ if(type == null) {
549+ throw new SQLException();
550+ } else {
551+ try {
552+ return (T)getObject(columnLabel);
553+ } catch(ClassCastException e) {
554+ throw new SQLException(e);
555+ }
556+ }
557+ }
558+
529559 }
--- relations/src/net/morilib/db/jdbc/RelationsConnection.java (revision 36)
+++ relations/src/net/morilib/db/jdbc/RelationsConnection.java (revision 37)
@@ -370,4 +370,22 @@
370370 throw new SQLFeatureNotSupportedException();
371371 }
372372
373+ @Override
374+ public void setSchema(String schema) throws SQLException {
375+ logger.finer("setSchema");
376+ // ignore it
377+ }
378+
379+ @Override
380+ public String getSchema() throws SQLException {
381+ logger.finer("getSchema");
382+ return null;
383+ }
384+
385+ @Override
386+ public int getNetworkTimeout() throws SQLException {
387+ logger.finer("getNetworkTimeout");
388+ throw new SQLFeatureNotSupportedException();
389+ }
390+
373391 }
--- relations/src/net/morilib/db/gui/EditorPanel.java (revision 36)
+++ relations/src/net/morilib/db/gui/EditorPanel.java (revision 37)
@@ -42,6 +42,7 @@
4242 import net.morilib.db.relations.Relation;
4343 import net.morilib.db.schema.SqlSchema;
4444
45+@SuppressWarnings("rawtypes")
4546 public class EditorPanel extends JPanel {
4647
4748 private class TL extends AbstractListModel
@@ -104,6 +105,7 @@
104105 private SqlSchema schema;
105106 private JTable table;
106107
108+ @SuppressWarnings("unchecked")
107109 public EditorPanel(SqlSchema f) {
108110 final JPopupMenu p1;
109111 final JComboBox c1;
旧リポジトリブラウザで表示