|
|
@ -45,6 +45,7 @@ public class DBCPAttrPane extends BasicPane { |
|
|
|
private static final int ORACLE_DEFAULT_FETCHSIZE = 128; |
|
|
|
private static final int ORACLE_DEFAULT_FETCHSIZE = 128; |
|
|
|
private static final int DB2_DEFAULT_FETCHSIZE = 50; |
|
|
|
private static final int DB2_DEFAULT_FETCHSIZE = 50; |
|
|
|
private static final int POSTGRE_DEFAULT_FETCHSIZE = 10000; |
|
|
|
private static final int POSTGRE_DEFAULT_FETCHSIZE = 10000; |
|
|
|
|
|
|
|
private static final int INVALID_FETCHSIZE = -1; |
|
|
|
// carl:DBCP的一些属性
|
|
|
|
// carl:DBCP的一些属性
|
|
|
|
private IntegerEditor DBCP_INITIAL_SIZE = new IntegerEditor(); |
|
|
|
private IntegerEditor DBCP_INITIAL_SIZE = new IntegerEditor(); |
|
|
|
private IntegerEditor DBCP_MIN_IDLE = new IntegerEditor(); |
|
|
|
private IntegerEditor DBCP_MIN_IDLE = new IntegerEditor(); |
|
|
@ -133,7 +134,7 @@ public class DBCPAttrPane extends BasicPane { |
|
|
|
if (DEFAULT_FETCHSIZE_MAP.containsKey(databaseName)) { |
|
|
|
if (DEFAULT_FETCHSIZE_MAP.containsKey(databaseName)) { |
|
|
|
this.FETCHSIZE.setText(String.valueOf(DEFAULT_FETCHSIZE_MAP.get(databaseName))); |
|
|
|
this.FETCHSIZE.setText(String.valueOf(DEFAULT_FETCHSIZE_MAP.get(databaseName))); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.FETCHSIZE.setText(String.valueOf(-1)); |
|
|
|
this.FETCHSIZE.setText(String.valueOf(INVALID_FETCHSIZE)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -171,14 +172,14 @@ public class DBCPAttrPane extends BasicPane { |
|
|
|
if (DEFAULT_FETCHSIZE_MAP.containsKey(databaseName)) { |
|
|
|
if (DEFAULT_FETCHSIZE_MAP.containsKey(databaseName)) { |
|
|
|
Optional.ofNullable(DEFAULT_FETCHSIZE_MAP.get(databaseName)).ifPresent(jdbcDatabase::setFetchSize); |
|
|
|
Optional.ofNullable(DEFAULT_FETCHSIZE_MAP.get(databaseName)).ifPresent(jdbcDatabase::setFetchSize); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
jdbcDatabase.setFetchSize(-1); |
|
|
|
jdbcDatabase.setFetchSize(INVALID_FETCHSIZE); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
int fetchSizeSet = Integer.parseInt(fetchSizeText); |
|
|
|
int fetchSizeSet = Integer.parseInt(fetchSizeText); |
|
|
|
if (DialectFactory.isValidFetchSize(fetchSizeSet)) { |
|
|
|
if (DialectFactory.isValidFetchSize(fetchSizeSet)) { |
|
|
|
jdbcDatabase.setFetchSize(fetchSizeSet); |
|
|
|
jdbcDatabase.setFetchSize(fetchSizeSet); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
jdbcDatabase.setFetchSize(-1); |
|
|
|
jdbcDatabase.setFetchSize(INVALID_FETCHSIZE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|