/** * Replace wildcards and return the expanded SQL statement. * * @param sql The SQL with embedded wildcards. * @return The SQL with no wildcards present. */ protected String createSchemaSql(String sql) { // replace prefix variable return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix); }
/** * Replace wildcards and return the expanded SQL statement. * * @param sql The SQL with embedded wildcards. * @return The SQL with no wildcards present. */ protected String createSchemaSql(String sql) { // replace prefix variable return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix); }
/** * Get the expanded property value. The following placeholders are supported: * ${table}: the table name (the default is DATASTORE) and * ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration * * @param prop the properties object * @param key the key * @param defaultValue the default value * @return the property value (placeholders are replaced) */ protected String getProperty(Properties prop, String key, String defaultValue) { String sql = prop.getProperty(key, defaultValue); sql = Text.replace(sql, "${table}", tableSQL).trim(); sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim(); return sql; }
/** * Get the expanded property value. The following placeholders are supported: * ${table}: the table name (the default is DATASTORE) and * ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration * * @param prop the properties object * @param key the key * @param defaultValue the default value * @return the property value (placeholders are replaced) */ protected String getProperty(Properties prop, String key, String defaultValue) { String sql = prop.getProperty(key, defaultValue); sql = Text.replace(sql, "${table}", tableSQL).trim(); sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim(); return sql; }
/** * Get the expanded property value. The following placeholders are supported: * ${table}: the table name (the default is DATASTORE) and * ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration * * @param prop the properties object * @param key the key * @param defaultValue the default value * @return the property value (placeholders are replaced) */ protected String getProperty(Properties prop, String key, String defaultValue) { String sql = prop.getProperty(key, defaultValue); sql = Text.replace(sql, "${table}", tableSQL).trim(); sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim(); return sql; }
/** * Applies the variable replacement to the given string. * * @param sql the string in which to replace variables * @return the new string */ private String replace(String sql) { String result = sql; for (Map.Entry<String, String> entry : varReplacement.entrySet()) { result = Text.replace(result, entry.getKey(), entry.getValue()).trim(); } return result; } }
/** * Applies the variable replacement to the given string. * * @param sql the string in which to replace variables * @return the new string */ private String replace(String sql) { String result = sql; for (Map.Entry<String, String> entry : varReplacement.entrySet()) { result = Text.replace(result, entry.getKey(), entry.getValue()).trim(); } return result; } }
/** * Applies the variable replacement to the given string. * * @param sql the string in which to replace variables * @return the new string */ private String replace(String sql) { String result = sql; for (Map.Entry<String, String> entry : varReplacement.entrySet()) { result = Text.replace(result, entry.getKey(), entry.getValue()).trim(); } return result; } }
protected String createSchemaSql(String sql) { return Text.replace( super.createSchemaSql(sql), TABLE_SPACE_VARIABLE, tableSpace); } }
protected String createSchemaSql(String sql) { return Text.replace( super.createSchemaSql(sql), TABLE_SPACE_VARIABLE, tableSpace); } }
if (encodeBlanks) { textVal = Text.replace(textVal, " ", "_x0020_");
if (encodeBlanks) { textVal = Text.replace(textVal, " ", "_x0020_");
if (encodeBlanks) { textVal = Text.replace(textVal, " ", "_x0020_");
if (decodeBlanks) { value = Text.replace(value, "_x0020_", " ");
if (decodeBlanks) { value = Text.replace(value, "_x0020_", " ");
if (decodeBlanks) { value = Text.replace(value, "_x0020_", " ");
if (decodeBlanks) { value = Text.replace(value, "_x0020_", " ");
creation.setTimeInMillis(creationTime); Name tokenName = session.getQName(Text.replace(ISO8601.format(creation), ":", ".")); NodeImpl tokenNode = super.addNode(tokenParent, tokenName, session.getQName(TOKEN_NT_NAME), NodeId.randomId());
creation.setTimeInMillis(creationTime); Name tokenName = session.getQName(Text.replace(ISO8601.format(creation), ":", ".")); NodeImpl tokenNode = super.addNode(tokenParent, tokenName, session.getQName(TOKEN_NT_NAME), NodeId.randomId());