Class SelectAppSetting
java.lang.Object
net.solarnetwork.central.common.dao.jdbc.sql.SelectAppSetting
- All Implemented Interfaces:
org.springframework.jdbc.core.PreparedStatementCreator,org.springframework.jdbc.core.SqlProvider
public class SelectAppSetting
extends Object
implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider
Select for
AppSetting instances.
The result columns in the SQL are:
- created (TIMESTAMP)
- modified (TIMESTAMP)
- skey (VARCHAR)
- stype (VARCHAR)
- svalue (VARCHAR)
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionSelectAppSetting(String[] keys, String[] types) Constructor.SelectAppSetting(String[] keys, String[] types, boolean forUpdate) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetSql()static SelectAppSettingselectForKey(String key) Select for a single key.static SelectAppSettingselectForKey(String key, boolean forUpdate) Select for a single key for update.static SelectAppSettingselectForKeyType(String key, String type) Select for a single key and type.static SelectAppSettingselectForKeyType(String key, String type, boolean forUpdate) Select for a single key and type.
-
Constructor Details
-
SelectAppSetting
Constructor.- Parameters:
keys- the optional keys to filter ontypes- the optional types to filter on
-
SelectAppSetting
Constructor.- Parameters:
keys- the optional keys to filter ontypes- the optional types to filter onforUpdate- true to use "for update" locking semantics
-
-
Method Details
-
selectForKey
Select for a single key.- Parameters:
key- the key- Returns:
- the select statement
- Throws:
IllegalArgumentException- if any argument is null
-
selectForKey
Select for a single key for update.- Parameters:
key- the keyforUpdate- true to use "for update" locking semantics- Returns:
- the select statement
- Throws:
IllegalArgumentException- if any argument is null
-
selectForKeyType
Select for a single key and type.- Parameters:
key- the keytype- the type- Returns:
- the select statement
- Throws:
IllegalArgumentException- if any argument is null
-
selectForKeyType
Select for a single key and type.- Parameters:
key- the keytype- the typeforUpdate- true to use "for update" locking semantics- Returns:
- the select statement
- Throws:
IllegalArgumentException- if any argument is null
-
getSql
- Specified by:
getSqlin interfaceorg.springframework.jdbc.core.SqlProvider
-
createPreparedStatement
- Specified by:
createPreparedStatementin interfaceorg.springframework.jdbc.core.PreparedStatementCreator- Throws:
SQLException
-