| Revision | 37 (tree) |
|---|---|
| Time | 2014-09-19 15:40:57 |
| Author | y-moriguchi |
Java SE 7 support
| @@ -404,4 +404,16 @@ | ||
| 404 | 404 | return false; |
| 405 | 405 | } |
| 406 | 406 | |
| 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 | + | |
| 407 | 419 | } |
| @@ -1332,4 +1332,31 @@ | ||
| 1332 | 1332 | "SPECIFIC_NAME"); |
| 1333 | 1333 | } |
| 1334 | 1334 | |
| 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 | + | |
| 1335 | 1362 | } |
| @@ -5,7 +5,9 @@ | ||
| 5 | 5 | import java.sql.Driver; |
| 6 | 6 | import java.sql.DriverPropertyInfo; |
| 7 | 7 | import java.sql.SQLException; |
| 8 | +import java.sql.SQLFeatureNotSupportedException; | |
| 8 | 9 | import java.util.Properties; |
| 10 | +import java.util.logging.Logger; | |
| 9 | 11 | |
| 10 | 12 | import net.morilib.db.schema.SqlSchema; |
| 11 | 13 | import net.morilib.db.schema.SqlSchemaFactory; |
| @@ -64,4 +66,9 @@ | ||
| 64 | 66 | return false; |
| 65 | 67 | } |
| 66 | 68 | |
| 69 | + @Override | |
| 70 | + public Logger getParentLogger() throws SQLFeatureNotSupportedException { | |
| 71 | + throw new SQLFeatureNotSupportedException(); | |
| 72 | + } | |
| 73 | + | |
| 67 | 74 | } |
| @@ -526,4 +526,34 @@ | ||
| 526 | 526 | throw new SQLFeatureNotSupportedException(); |
| 527 | 527 | } |
| 528 | 528 | |
| 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 | + | |
| 529 | 559 | } |
| @@ -370,4 +370,22 @@ | ||
| 370 | 370 | throw new SQLFeatureNotSupportedException(); |
| 371 | 371 | } |
| 372 | 372 | |
| 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 | + | |
| 373 | 391 | } |
| @@ -42,6 +42,7 @@ | ||
| 42 | 42 | import net.morilib.db.relations.Relation; |
| 43 | 43 | import net.morilib.db.schema.SqlSchema; |
| 44 | 44 | |
| 45 | +@SuppressWarnings("rawtypes") | |
| 45 | 46 | public class EditorPanel extends JPanel { |
| 46 | 47 | |
| 47 | 48 | private class TL extends AbstractListModel |
| @@ -104,6 +105,7 @@ | ||
| 104 | 105 | private SqlSchema schema; |
| 105 | 106 | private JTable table; |
| 106 | 107 | |
| 108 | + @SuppressWarnings("unchecked") | |
| 107 | 109 | public EditorPanel(SqlSchema f) { |
| 108 | 110 | final JPopupMenu p1; |
| 109 | 111 | final JComboBox c1; |