AbstractDatabasePlatform implements IDatabasePlatform { public TimeZone getTimeZone(String value) { TimeZone tz = TimeZone.getTimeZone("GMT" + value); if (tz.getRawOffset() == 0) { tz = TimeZone.getTimeZone(value); } return tz; } AbstractDatabasePlatform(SqlTemplateSettings settings); DatabaseInfo getDatabaseInfo(); abstract ISqlTemplate getSqlTemplate(); abstract ISqlTemplate getSqlTemplateDirty(); DmlStatement createDmlStatement(DmlType dmlType, Table table, String textColumnExpression); DmlStatement createDmlStatement(DmlType dmlType, String catalogName, String schemaName, String tableName, Column[] keys,
            Column[] columns, boolean[] nullKeyValues, String textColumnExpression); DmlStatement createDmlStatement(DmlType dmlType, String catalogName, String schemaName, String tableName, Column[] keys,
            Column[] columns, boolean[] nullKeyValues, String textColumnExpression, boolean namedParameters); IDdlReader getDdlReader(); IDdlBuilder getDdlBuilder(); void setClearCacheModelTimeoutInMs(long clearCacheModelTimeoutInMs); long getClearCacheModelTimeoutInMs(); void dropTables(boolean continueOnError, Table... tables); void dropDatabase(Database database, boolean continueOnError); void createTables(boolean dropTablesFirst, boolean continueOnError, Table... tables); void createDatabase(Database targetDatabase, boolean dropTablesFirst, boolean continueOnError); void alterDatabase(Database desiredDatabase, boolean continueOnError, IAlterDatabaseInterceptor[] interceptors); void alterDatabase(Database desiredDatabase, boolean continueOnError); void alterTables(boolean continueOnError, Table... desiredTables); void alterTables(boolean continueOnError, IAlterDatabaseInterceptor[] interceptors, Table... desiredTables); Database readDatabase(String catalog, String schema, String[] tableTypes); Database readFromDatabase(Table... tables); Table readTableFromDatabase(String catalogName, String schemaName, String tableName); void resetCachedTableModel(); Table getTableFromCache(String tableName, boolean forceReread); Table getTableFromCache(String catalogName, String schemaName, String tableName, boolean forceReread); Object[] getObjectValues(BinaryEncoding encoding, Table table, String[] columnNames, String[] values); Object[] getObjectValues(BinaryEncoding encoding, Table table, String[] columnNames, String[] values, boolean useVariableDates,
            boolean fitToColumn); Object[] getObjectValues(BinaryEncoding encoding, String[] values, Column[] orderedMetaData); Object[] getObjectValues(BinaryEncoding encoding, String[] values, Column[] orderedMetaData, boolean useVariableDates,
            boolean fitToColumn); String[] getStringValues(BinaryEncoding encoding, Column[] metaData, Row row, boolean useVariableDates, boolean indexByPosition); String getCsvStringValue(BinaryEncoding encoding, Column[] metaData, Row row, boolean[] isColumnPositionUsingTemplate); Map<String, String> getSqlScriptReplacementTokens(); String scrubSql(String sql); java.util.Date parseDate(int type, String value, boolean useVariableDates); @Override Map<String, String> parseQualifiedTableName(String tableName); Table makeAllColumnsPrimaryKeys(Table table); boolean isLob(int type); boolean isClob(int type); boolean isBlob(int type); List<Column> getLobColumns(Table table); void setMetadataIgnoreCase(boolean metadataIgnoreCase); boolean isMetadataIgnoreCase(); boolean isStoresLowerCaseIdentifiers(); boolean isStoresMixedCaseQuotedIdentifiers(); boolean isStoresUpperCaseIdentifiers(); Database readDatabaseFromXml(String filePath, boolean alterCaseToMatchDatabaseDefaultCase); void prefixDatabase(String prefix, Database targetTables); void alterCaseToMatchDatabaseDefaultCase(Database database); String[] alterCaseToMatchDatabaseDefaultCase(String[] values); String alterCaseToMatchDatabaseDefaultCase(String value); void alterCaseToMatchDatabaseDefaultCase(Table... tables); void alterCaseToMatchDatabaseDefaultCase(Table table); Database readDatabaseFromXml(InputStream is, boolean alterCaseToMatchDatabaseDefaultCase); boolean canColumnBeUsedInWhereClause(Column column); java.util.Date parseTimestamp(int type, String value); TimeZone getTimeZone(String value); @Override void makePlatformSpecific(Database database); List<PermissionResult> checkSymTablePermissions(PermissionType... permissionTypes); boolean isUseMultiThreadSyncTriggers(); @Override boolean supportsTransactions(); @Override boolean supportsMultiThreadedTransactions(); long getEstimatedRowCount(Table table); String getTruncateSql(Table table); String getDeleteSql(Table table); static final String REQUIRED_FIELD_NULL_SUBSTITUTE; static final String ZERO_DATE_STRING; }
@Test public void testParseTimeZone() { assertEquals(-18000000, testDatabasePlatform.getTimeZone("EST").getRawOffset()); assertEquals(-18000000, testDatabasePlatform.getTimeZone("-05:00").getRawOffset()); }