/** * Constructor with inputstream fileName. * * @param fileName * fileName present in classPath or on fileSystem. */ public InMemoryPropertyStore(InputStream xmlIN) { loadConf(xmlIN); }
/** * Setter accessor for attribute 'locations'. * * @param locations * new value for 'locations ' */ public void setLocation(String locations) { loadConfFile(locations); }
/**s * Constructor from DataSource. * * @param jdbcDS * native jdbc datasource */ public JdbcPropertyStore(DataSource jdbcDS, String xmlConfFile) { this(jdbcDS); importPropertiesFromXmlFile(xmlConfFile); }
/** {@inheritDoc} */ public boolean existProperty(String name) { return target.existProperty(name); }
/** {@inheritDoc} */ @Override public Property<?> readProperty(String name, Property<?> defaultValue) { return target.readProperty(name, defaultValue); }
/** {@inheritDoc} */ public Map<String, Property<?>> readAllProperties() { return target.readAllProperties(); }
/** {@inheritDoc} */ public Set<String> listPropertyNames() { return target.listPropertyNames(); }
/** TDD. */ @Test(expected = IllegalArgumentException.class) public void updateKOempty() { // When testedStore.updateProperty("", "aa"); }
/** TDD. */ @Test(expected = IllegalArgumentException.class) public void addPropertyKONull() { // Given testedStore.createProperty(null); // Then expect to fail }
/** {@inheritDoc} */ @Override public void clear() { ff4jStore().clear(); }
/** {@inheritDoc} */ public Property<?> mapRow(ResultSet rs, int row) throws SQLException { return super.map(rs); }
/** {@inheritDoc} */ public boolean isEmpty() { return target.isEmpty(); }
/** {@inheritDoc} */ @Override public Property<?> readProperty(String name, Property < ? > defaultValue) { try { return readProperty(name); } catch(PropertyNotFoundException pnf) { return defaultValue; } }
/** {@inheritDoc} */ @Override public int getInt(String key, int defaultValue) { return ff4jStore().existProperty(key) ? getInt(key) : defaultValue; }
/** {@inheritDoc} */ public Property<?> readProperty(String name) { return target.readProperty(name); }
/** {@inheritDoc} */ @Override public Map<String, Property<?>> readAllProperties() { return getTargetPropertyStore().readAllProperties(); }
/** {@inheritDoc} */ @Override public short getShort(String key, short defaultValue) { return ff4jStore().existProperty(key) ? getShort(key) : defaultValue; }
/** * Read property in Store * * @param featureID * target feature ID * @return target feature. */ public Property<?> getProperty(String propertyName) { return getPropertiesStore().readProperty(propertyName); }
/** {@inheritDoc} */ @Override public Short getShort(String key, Short defaultValue) { return ff4jStore().existProperty(key) ? getShort(key) : defaultValue; }
/** {@inheritDoc} */ @Override public BigInteger getBigInteger(String key, BigInteger defaultValue) { return ff4jStore().existProperty(key) ? getBigInteger(key) : defaultValue; }