1 | propertiesAlreadyLoaded = true;↵ | | 1 | if (propertiesAlreadyLoaded =↵
|
2 | ↵ | | 2 | = false) {↵
|
3 | // get parameters previously set by user, or set default values↵ | | 3 | // get parameters previously set by user, or set default values↵
|
4 | useJavaDefaultFormat =true; // set to use the Java default↵ | | 4 | useJavaDefaultFormat =true; // set to use the Java default↵
|
5 | String useJavaDefaultFormatString = DTProperties.get(↵ | | 5 | String useJavaDefaultFormatString = DTProperties.get(↵
|
6 | thisClassName, "useJavaDefaultFormat");↵ | | 6 | thisClassName, "useJavaDefaultFormat");↵
|
7 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))↵ | | 7 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))↵
|
8 | useJavaDefaultFormat =false;↵ | | 8 | useJavaDefaultFormat =false;↵
|
|
9 | // get which locale-dependent format to use↵ | | 9 | // get which locale-dependent format to use↵
|
10 | localeFormat =DateFormat.SHORT; // set to use the Java default↵ | | 10 | localeFormat =DateFormat.SHORT; // set to use the Java default↵
|
11 | String localeFormatString = DTProperties.get(↵ | | 11 | String localeFormatString = DTProperties.get(↵
|
12 | thisClassName, "localeFormat");↵ | | 12 | thisClassName, "localeFormat");↵
|
13 | if (localeFormatString != null)↵ | | 13 | if (localeFormatString != null)↵
|
14 | localeFormat = Integer.parseInt(localeFormatString);↵ | | 14 | localeFormat = Integer.parseInt(localeFormatString);↵
|
|
15 | // use lenient input or force user to enter exact format↵ | | 15 | // use lenient input or force user to enter exact format↵
|
16 | lenient = true; // set to allow less stringent input↵ | | 16 | lenient = true; // set to allow less stringent input↵
|
17 | String lenientString = DTProperties.get(↵ | | 17 | String lenientString = DTProperties.get(↵
|
18 | thisClassName, "lenient");↵ | | 18 | thisClassName, "lenient");↵
|
19 | if (lenientString != null && lenientString.equals("false"))↵ | | 19 | if (lenientString != null && lenientString.equals("false"))↵
|
20 | lenient =false;↵ | | 20 | lenient =false;↵
|
21 | ↵ | | |
|
22 | ↵ | | |
|
23 | // Bug #1757076↵ | | 21 | // ↵
|
24 | // always use false unless user specifies otherwise; this breaks↵ | | |
|
25 | // date editing in Derby (possibly DB2 as well)↵ | | |
|
26 | readDateAsTimestamp = false;↵ | | |
|
27 | String readDateAsTimestampString = ↵ | | |
|
28 | ↵ | | 22 | how to use Timestamp in WHERE clauses↵
|
| | | 23 | whereClauseUsage = USE_JDBC_ESCAPE_FORMAT; // default to SQL standard↵
|
29 | DTProperties.get(↵ | | 24 | String whereClauseUsageString = DTProperties.get(↵
|
30 | thisClassName, "readDateAsTimestamp");↵ | | 25 | thisClassName, "whereClauseUsage");↵
|
31 | if (readDateAsTimestampString != null && ↵ | | 26 | if (whereClauseUsageString != null↵
|
32 | ↵ | | 27 | )↵
|
33 | readDateAsTimestampString.equals("true")) ↵ | | 28 | ↵
|
34 | {↵ | | |
|
35 | readDateAsTimestamp = true;↵ | | |
|
36 | ↵ | | 29 | whereClauseUsage = Integer.parseInt(whereClauseUsageString);↵
|
37 | } | | 30 | }
|