org.nhindirect.config.store.dao.impl
Class SettingDaoImpl

java.lang.Object
  extended by org.nhindirect.config.store.dao.impl.SettingDaoImpl
All Implemented Interfaces:
SettingDao

@Repository
public class SettingDaoImpl
extends Object
implements SettingDao

Implementing class for Setting DAO methods.

Author:
Greg Meyer

Constructor Summary
SettingDaoImpl()
           
 
Method Summary
 void add(String name, String value)
          Adds a new setting.
 void delete(Collection<String> names)
          Delete a set of settings with the given names.
 Collection<Setting> getAll()
          Get all settings.
 Collection<Setting> getByNames(Collection<String> names)
          Get a collection of settings by names.
 void update(String name, String value)
          Updates a setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingDaoImpl

public SettingDaoImpl()
Method Detail

add

@Transactional(readOnly=false)
public void add(String name,
                              String value)
Adds a new setting. Fails if the setting already exists.

Specified by:
add in interface SettingDao
Parameters:
name - The name of the setting to add.
value - The value of the setting to add.

delete

@Transactional(readOnly=false)
public void delete(Collection<String> names)
Delete a set of settings with the given names.

Specified by:
delete in interface SettingDao
Parameters:
names - The names of the settings to delete.

getAll

@Transactional(readOnly=true)
public Collection<Setting> getAll()
Get all settings.

Specified by:
getAll in interface SettingDao
Returns:
All settings

getByNames

@Transactional(readOnly=true)
public Collection<Setting> getByNames(Collection<String> names)
Get a collection of settings by names.

Specified by:
getByNames in interface SettingDao
Parameters:
names - The names to search for.
Returns:
A collection of settings matching the names.

update

@Transactional(readOnly=false)
public void update(String name,
                                 String value)
Updates a setting.

Specified by:
update in interface SettingDao
Parameters:
name - The name of the setting to update.
value - The value of the setting to update.


Copyright © 2011. All Rights Reserved.