public abstract class AbstractConfigurationJPADaoImpl<C extends AbstractConfiguration> extends AbstractQueryableDaoImpl<C> implements ConfigurationDao<String,String,C>, Serializable
AbstractConfiguration class for other modules to extend.
EntityManager maybe null and hence checked for in some methods.emct, tNAMESPACE_DELIM| Constructor and Description |
|---|
AbstractConfigurationJPADaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(C config)
Remove a configuration
|
Map |
get(String namespace)
Get a Map of key name and corresponding
IConfiguration for the specific namespace. |
String |
get(String namespace,
String key)
Will throw an exception if it did not find any matching result for the Config
Note: param matching is case insensitive |
String |
get(User user,
String namespace,
String key)
Get a configuration in the context to a
User |
Map |
getAll(String namespace)
Get a Map of key name and corresponding
AbstractConfiguration for the specific namespace. |
C |
getConfig(C proxy) |
C |
getConfig(String namespace,
String key) |
List<C> |
getConfigs(String namespace)
Get configurations for a namespace and nested namesapces, as a collection of C
|
List<String> |
getNamespaces()
Get list of namespaces
|
C |
put(C config)
Updates the configurations and returns the updated configuration object for chaining
|
conditionConstruct, count, ensureRowIsEntity, ensureRowIsEntity, getEntityInstance, getQueryObject, query, query, queryPage, queryPagedelete, getEntityManager, getNativeEntityName, load, load, paginate, query, query, save, setEntityManager, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, load, load, savepublic C put(C config)
put in interface ConfigurationDao<String,String,C extends AbstractConfiguration>{@link - AbstractConfiguration} (Generic type extends Configuration)public C getConfig(C proxy)
getConfig in interface ConfigurationDao<String,String,C extends AbstractConfiguration>public C getConfig(String namespace, String key)
getConfig in interface ConfigurationDao<String,String,C extends AbstractConfiguration>namespace - as Stringkey - as StringAbstractConfigurationpublic String get(String namespace, String key)
get in interface ConfigurationDao<String,String,C extends AbstractConfiguration>get in interface ConfigurationSource<String,String>namespace - as Stringkey - as StringAbstractConfiguration (Generic type extends Configuration) @nullable true, if no config existsExceptionpublic String get(User user, String namespace, String key)
ConfigurationSourceUserget in interface ConfigurationSource<String,String>public Map get(String namespace)
IConfiguration for the specific namespace.
get in interface ConfigurationSource<String,String>namespace - as StringIConfigurationpublic Map getAll(String namespace)
ConfigurationDaoAbstractConfiguration for the specific namespace.
ConfigurationSource.NAMESPACE_DELIM
This method respects hierarchy based on default convention.getAll in interface ConfigurationDao<String,String,C extends AbstractConfiguration>namespace - as StringAbstractConfigurationpublic List<String> getNamespaces()
ConfigurationDaogetNamespaces in interface ConfigurationDao<String,String,C extends AbstractConfiguration>public List<C> getConfigs(String namespace)
ConfigurationDaogetConfigs in interface ConfigurationDao<String,String,C extends AbstractConfiguration>namespace - as StringCollection of Cpublic void delete(C config)
ConfigurationDaodelete in interface ConfigurationDao<String,String,C extends AbstractConfiguration>delete in interface GenericDao<C extends AbstractConfiguration>delete in class GenericDaoImpl<C extends AbstractConfiguration>Copyright © 2018. All rights reserved.