private String identifier(String s) { if (database.getMode().lowerCaseIdentifiers) { s = s == null ? null : StringUtils.toLowerEnglish(s); } return s; }
private String convertColumnName(String columnName) { if ((storesMixedCase || storesLowerCase) && columnName.equals(StringUtils.toLowerEnglish(columnName))) { columnName = StringUtils.toUpperEnglish(columnName); } else if (storesMixedCase && !supportsMixedCaseIdentifiers) { // TeraData columnName = StringUtils.toUpperEnglish(columnName); } else if (storesMixedCase && storesMixedCaseQuoted) { // MS SQL Server (identifiers are case insensitive even if quoted) columnName = StringUtils.toUpperEnglish(columnName); } return columnName; }
Locale locale = new Locale(StringUtils.toLowerEnglish(name), ""); if (compareLocaleNames(locale, name)) { result = Collator.getInstance(locale); String language = StringUtils.toLowerEnglish(name.substring(0, idx)); String country = name.substring(idx + 1); Locale locale = new Locale(language, country);
"getInstance", Locale.class); if (name.length() == 2) { Locale locale = new Locale(StringUtils.toLowerEnglish(name), ""); if (compareLocaleNames(locale, name)) { result = (Comparator<String>) getInstanceMethod.invoke(null, locale); String language = StringUtils.toLowerEnglish(name.substring(0, idx)); String country = name.substring(idx + 1); Locale locale = new Locale(language, country);
public void configure(Properties params) { JdbcRepository repo = (JdbcRepository) database.getRepository(); String shardName = params.getProperty("shard", repo.getPublicDB()); String catalog = params.getProperty("catalog"); String schema = params.getProperty("schema"); String tableName = params.getProperty("tableName", DEF_TABLE); tableName = database.identifier(tableName); if (catalog != null) { catalog = database.identifier(catalog); } if (schema != null) { schema = database.identifier(schema); } tableNode = new ObjectNode(shardName, catalog, schema, tableName, null); nameValue = StringUtils.toLowerEnglish(getName()); nameColumnName = params.getProperty("nameColumnName", DEF_NAME_COLUMN); valueColumnName = params.getProperty("valueColumnName", DEF_VALUE_COLUMN); nameColumnLength = getIntProperty(params, "nameColumnLength", DEF_NAMECOLUMNLENGTH_LENGTH); incrementSize = getIntProperty(params, "cacheSize", (int) getCacheSize()); initialValue = getIntProperty(params, "initialValue", DEFAULT_INITIAL_VALUE); this.selectQuery = buildSelectQuery(); this.updateQuery = buildUpdateQuery(); this.insertQuery = buildInsertQuery(); this.dataSource = repo.getDataSourceByShardName(shardName); this.optimizer = new HiloOptimizer(incrementSize); this.createTableIfNotExits(); }
read("="); String charset = StringUtils.toLowerEnglish(readUniqueIdentifier()); command.setCharset(charset);