Class JdbcAppSettingDao
java.lang.Object
net.solarnetwork.central.common.dao.jdbc.JdbcAppSettingDao
- All Implemented Interfaces:
AppSettingDao,net.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
JDBC implementation of
AppSettingDao.- Since:
- 2.0
-
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 -
Constructor Summary
ConstructorsConstructorDescriptionJdbcAppSettingDao(org.springframework.jdbc.core.JdbcOperations jdbcOps) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(AppSetting entity) intDelete all settings with a given key.Class<? extends AppSetting> lockForUpdate(String key) Transactionally lock a set of settings in the database.lockForUpdate(String key, String type) Transactionally lock a specific setting in the database.save(AppSetting entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.dao.GenericDao
entityEventTopic, entityKey
-
Constructor Details
-
JdbcAppSettingDao
public JdbcAppSettingDao(org.springframework.jdbc.core.JdbcOperations jdbcOps) Constructor.- Parameters:
jdbcOps- the JDBC operations- Throws:
IllegalArgumentException- if any argument is null
-
-
Method Details
-
getObjectType
- Specified by:
getObjectTypein interfacenet.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
-
save
- Specified by:
savein interfacenet.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
-
get
- Specified by:
getin interfacenet.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
-
getAll
- Specified by:
getAllin interfacenet.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
-
delete
- Specified by:
deletein interfacenet.solarnetwork.dao.GenericDao<AppSetting,KeyTypePK>
-
deleteAll
Description copied from interface:AppSettingDaoDelete all settings with a given key.- Specified by:
deleteAllin interfaceAppSettingDao- Parameters:
key- the key of the settings to delete- Returns:
- the number of settings deleted
-
lockForUpdate
Description copied from interface:AppSettingDaoTransactionally lock a specific setting in the database.- Specified by:
lockForUpdatein interfaceAppSettingDao- Parameters:
key- the key of the setting to locktype- the type of the setting to lock- Returns:
- the locked setting
-
lockForUpdate
Description copied from interface:AppSettingDaoTransactionally lock a set of settings in the database.- Specified by:
lockForUpdatein interfaceAppSettingDao- Parameters:
key- the key of the setting to lock- Returns:
- the locked settings
-