boolean hasKnownPrefix(String key) { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (key.startsWith(prefix)) return true; } return false; }
/** * Affirms if the given key starts with any of the known prefix. * @param key */ protected boolean isKnownPrefix(String key) { if (key == null) return false; for (String prefix : ProductDerivations.getConfigurationPrefixes()) { if (key.startsWith(prefix)) return true; } return false; }
boolean hasKnownPrefix(String key) { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (key.startsWith(prefix)) return true; } return false; }
boolean hasKnownPrefix(String key) { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (key.startsWith(prefix)) return true; } return false; }
/** * Affirms if the given key starts with any of the known prefix. * @param key * @return */ protected boolean isKnownPrefix(String key) { if (key == null) return false; for (String prefix : ProductDerivations.getConfigurationPrefixes()) { if (key.startsWith(prefix)) return true; } return false; }
/** * Affirms if the given key starts with any of the known prefix. * @param key */ protected boolean isKnownPrefix(String key) { if (key == null) return false; for (String prefix : ProductDerivations.getConfigurationPrefixes()) { if (key.startsWith(prefix)) return true; } return false; }
/** * Affirms if the given key starts with any of the known prefix. * @param key * @return */ protected boolean isKnownPrefix(String key) { if (key == null) return false; for (String prefix : ProductDerivations.getConfigurationPrefixes()) { if (key.startsWith(prefix)) return true; } return false; }
/** * Return a comprehensive list of recognized map keys. */ private Collection newPropertyList() { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); List l = new ArrayList(_vals.size() * prefixes.length); for (int i = 0; i < _vals.size(); i++) { for (int j = 0; j < prefixes.length; j++) l.add(prefixes[j] + "." + ((Value) _vals.get(i)).getProperty()); } return l; }
/** * Return a comprehensive list of recognized map keys. */ private Collection<String> newPropertyList() { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); List<String> l = new ArrayList<String>(_vals.size() * prefixes.length); for(Value v : _vals) { for (int j = 0; j < prefixes.length; j++) l.add(prefixes[j] + "." + v.getProperty()); } return l; }
protected boolean isInvalidProperty(String propName) { if (super.isInvalidProperty(propName)) return true; // handle openjpa.jdbc.SomeMisspelledProperty, but not // openjpa.someotherimplementation.SomeProperty String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) if (propName.toLowerCase().startsWith(prefixes[i] + ".jdbc")) return true; return false; }
protected boolean isInvalidProperty(String propName) { if (super.isInvalidProperty(propName)) return true; // handle openjpa.jdbc.SomeMisspelledProperty, but not // openjpa.someotherimplementation.SomeProperty String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) if (propName.toLowerCase().startsWith(prefixes[i] + ".jdbc")) return true; return false; } }
/** * Return a comprehensive list of recognized map keys. */ private Collection<String> newPropertyList() { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); List<String> l = new ArrayList<String>(_vals.size() * prefixes.length); for(Value v : _vals) { for (int j = 0; j < prefixes.length; j++) l.add(prefixes[j] + "." + v.getProperty()); } return l; }
protected boolean isInvalidProperty(String propName) { if (super.isInvalidProperty(propName)) return true; // handle openjpa.jdbc.SomeMisspelledProperty, but not // openjpa.someotherimplementation.SomeProperty String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefixes[i] + ".jdbc")) return true; return false; }
protected boolean isInvalidProperty(String propName) { if (super.isInvalidProperty(propName)) return true; // handle openjpa.jdbc.SomeMisspelledProperty, but not // openjpa.someotherimplementation.SomeProperty String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefixes[i] + ".jdbc")) return true; return false; }
protected boolean isInvalidProperty(String propName) { if (super.isInvalidProperty(propName)) return true; // handle openjpa.jdbc.SomeMisspelledProperty, but not // openjpa.someotherimplementation.SomeProperty String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) if (propName.toLowerCase().startsWith(prefixes[i] + ".jdbc")) return true; return false; }
/** * Return a comprehensive list of recognized map keys. */ private Collection<String> newPropertyList() { String[] prefixes = ProductDerivations.getConfigurationPrefixes(); List<String> l = new ArrayList<String>(_vals.size() * prefixes.length); for(Value v : _vals) { for (int j = 0; j < prefixes.length; j++) l.add(prefixes[j] + "." + v.getProperty()); } return l; }
/** * Returns true if the specified property name should raise a warning * if it is not found in the list of known properties. */ protected boolean isInvalidProperty(String propName) { // handle warnings for openjpa.SomeString, but not for // openjpa.some.subpackage.SomeString, since it might be valid for some // specific implementation of OpenJPA String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (int i = 0; i < prefixes.length; i++) { if (propName.toLowerCase().startsWith(prefixes[i]) && propName.length() > prefixes[i].length() + 1 && propName.indexOf('.', prefixes[i].length()) == prefixes[i].length() && propName.indexOf('.', prefixes[i].length() + 1) == -1) return true; } return false; }
/** * Returns true if the specified property name should raise a warning * if it is not found in the list of known properties. */ protected boolean isInvalidProperty(String propName) { // handle warnings for openjpa.SomeString, but not for // openjpa.some.subpackage.SomeString, since it might be valid for some // specific implementation of OpenJPA String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefix) && propName.length() > prefix.length() + 1 && propName.indexOf('.', prefix.length()) == prefix.length() && propName.indexOf('.', prefix.length() + 1) == -1 && "openjpa".equals(prefix)) return true; } return false; }
/** * Returns true if the specified property name should raise a warning * if it is not found in the list of known properties. */ protected boolean isInvalidProperty(String propName) { // handle warnings for openjpa.SomeString, but not for // openjpa.some.subpackage.SomeString, since it might be valid for some // specific implementation of OpenJPA String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (propName.toLowerCase(Locale.ENGLISH).startsWith(prefix) && propName.length() > prefix.length() + 1 && propName.indexOf('.', prefix.length()) == prefix.length() && propName.indexOf('.', prefix.length() + 1) == -1 && "openjpa".equals(prefix)) return true; } return false; }
/** * Returns true if the specified property name should raise a warning * if it is not found in the list of known properties. */ protected boolean isInvalidProperty(String propName) { // handle warnings for openjpa.SomeString, but not for // openjpa.some.subpackage.SomeString, since it might be valid for some // specific implementation of OpenJPA String[] prefixes = ProductDerivations.getConfigurationPrefixes(); for (String prefix : prefixes) { if (propName.toLowerCase().startsWith(prefix) && propName.length() > prefix.length() + 1 && propName.indexOf('.', prefix.length()) == prefix.length() && propName.indexOf('.', prefix.length() + 1) == -1 && "openjpa".equals(prefix)) return true; } return false; }