public abstract class AbstractPropertyStore extends Object implements PropertyStore
| Constructor and Description |
|---|
AbstractPropertyStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertPropertyExist(String name)
Validate property name and existence
|
protected void |
assertPropertyNotExist(String uid)
Check that current feature does not exist.
|
protected void |
assertPropertyNotNull(Property<?> property)
Validate feature uid.
|
void |
createSchema()
Initialize target database with expected schema if needed.
|
void |
importProperties(Collection<Property<?>> properties)
Import a set of properties.
|
Map<String,Property<?>> |
importPropertiesFromXmlFile(String xmlConfFile)
Initialize store from XML Configuration File.
|
boolean |
isEmpty()
Tell if a store is empty
|
Property<?> |
readProperty(String name,
Property<?> defaultValue)
Read property value and if not found return the default value
|
String |
toJson() |
<T> void |
updateProperty(Property<T> prop)
Update existing property.
|
void |
updateProperty(String name,
String newValue)
Update existing property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, createProperty, deleteProperty, existProperty, listPropertyNames, readAllProperties, readPropertypublic Map<String,Property<?>> importPropertiesFromXmlFile(String xmlConfFile)
xmlConfFile - xml configuration filepublic boolean isEmpty()
isEmpty in interface PropertyStorepublic String toJson()
protected void assertPropertyExist(String name)
uid - target uidprotected void assertPropertyNotExist(String uid)
uid - current feature identifier.sprotected void assertPropertyNotNull(Property<?> property)
uid - target uidpublic <T> void updateProperty(Property<T> prop)
updateProperty in interface PropertyStorepublic void updateProperty(String name, String newValue)
updateProperty in interface PropertyStorename - target namenewValue - new valuepublic void importProperties(Collection<Property<?>> properties)
importProperties in interface PropertyStoreproperties - a set of propertiespublic Property<?> readProperty(String name, Property<?> defaultValue)
readProperty in interface PropertyStorename - target property namepublic void createSchema()
createSchema in interface PropertyStoreCopyright © 2013–2017 FF4J. All rights reserved.