@Singleton public class AmbariConfigurationDAO extends CrudDAO<AmbariConfigurationEntity,AmbariConfigurationEntityPK>
Constructor and Description |
---|
AmbariConfigurationDAO() |
Modifier and Type | Method and Description |
---|---|
void |
create(AmbariConfigurationEntity entity)
Creates entity.
|
List<AmbariConfigurationEntity> |
findByCategory(String categoryName)
Returns the Ambari configuration properties with the requested category name from the database.
|
AmbariConfigurationEntity |
merge(AmbariConfigurationEntity entity)
Updates entity.
|
boolean |
reconcileCategory(String categoryName,
Map<String,String> properties,
boolean removeIfNotProvided)
Reconciles the properties associted with an Ambari confgiration category (for example, ldap-configuration)
using persisted properties and the supplied properties.
|
int |
removeByCategory(String categoryName)
Removes the Ambari configuration properties with the requested category name from the database.
|
public List<AmbariConfigurationEntity> findByCategory(String categoryName)
categoryName
- the configuration category namepublic int removeByCategory(String categoryName)
categoryName
- the configuration category namepublic void create(AmbariConfigurationEntity entity)
CrudDAO
create
in class CrudDAO<AmbariConfigurationEntity,AmbariConfigurationEntityPK>
entity
- entity to createpublic AmbariConfigurationEntity merge(AmbariConfigurationEntity entity)
CrudDAO
merge
in class CrudDAO<AmbariConfigurationEntity,AmbariConfigurationEntityPK>
entity
- entity to updatepublic boolean reconcileCategory(String categoryName, Map<String,String> properties, boolean removeIfNotProvided)
if removeIfNotProvided
is true
, only properties that exist in the new set of
properties will be persisted; others will be removed.
If removeIfNotProvided
is false
, then the new properties will be used
to update or append to the set of persisted properties.
categoryName
- the category name for the set of propertiesproperties
- a map of name to value pairsremoveIfNotProvided
- true
to explicitly set the set of properties for the category; false
to upadate the set of properties for the categorytrue
if changes were made; false
if not changes were made.Copyright © 2022 Apache Software Foundation. All rights reserved.