Interface AppSettingDao

All Superinterfaces:
net.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
All Known Implementing Classes:
JdbcAppSettingDao

public interface AppSettingDao extends net.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
DAO API for internal application settings.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.solarnetwork.dao.GenericDao

    net.solarnetwork.dao.GenericDao.EntityEventType, net.solarnetwork.dao.GenericDao.StandardSortKey
  • Field Summary

    Fields inherited from interface net.solarnetwork.dao.GenericDao

    ENTITY_EVENT_ENTITY_ID_PROPERTY, ENTITY_EVENT_ENTITY_PROPERTY, ENTITY_EVENT_TOPIC_TEMPLATE, SORT_BY_CREATED_ASCENDING, SORT_BY_CREATED_DESCENDING, SORT_BY_CREATED_ID_ASCENDING, SORT_BY_CREATED_ID_DESCENDING, SORT_BY_ID_ASCENDING, SORT_BY_ID_DESCENDING
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Delete all settings with a given key.
    Transactionally lock a set of settings in the database.
    Transactionally lock a specific setting in the database.

    Methods inherited from interface net.solarnetwork.dao.GenericDao

    delete, entityEventTopic, entityKey, get, getAll, getObjectType, save
  • Method Details

    • deleteAll

      int deleteAll(String key)
      Delete all settings with a given key.
      Parameters:
      key - the key of the settings to delete
      Returns:
      the number of settings deleted
    • lockForUpdate

      AppSetting lockForUpdate(String key, String type)
      Transactionally lock a specific setting in the database.
      Parameters:
      key - the key of the setting to lock
      type - the type of the setting to lock
      Returns:
      the locked setting
      Throws:
      IllegalArgumentException - if any argument is null
    • lockForUpdate

      Collection<AppSetting> lockForUpdate(String key)
      Transactionally lock a set of settings in the database.
      Parameters:
      key - the key of the setting to lock
      Returns:
      the locked settings
      Throws:
      IllegalArgumentException - if any argument is null