Class ConfigurationDao
- java.lang.Object
-
- org.apache.openmeetings.db.dao.basic.ConfigurationDao
-
- All Implemented Interfaces:
IDataProviderDao<Configuration>
@Repository @Transactional public class ConfigurationDao extends Object implements IDataProviderDao<Configuration>
Insert/update/Delete onConfiguration
It provides basic mechanism to get a Conf Key:getBool(String, boolean)
getLong(String, Long)
getInt(String, int)
getString(String, String)
get(String)
is deprecated!- Author:
- swagner
-
-
Constructor Summary
Constructors Constructor Description ConfigurationDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count()
Count the number of instances ofIDataProviderDao
long
count(String search)
Count the number of instances ofIDataProviderDao
void
delete(Configuration entity, Long userId)
Delete an instance ofIDataProviderDao
Configuration
forceGet(String key)
Retrieves Configuration regardless of its deleted statusList<Configuration>
get(long start, long count)
Get a list of instances ofIDataProviderDao
Configuration
get(Long id)
Get an instance of anIDataProviderDao
Configuration
get(String key)
List<Configuration>
get(String... keys)
List<Configuration>
get(String search, long start, long count, String sort)
Get a list of instances ofIDataProviderDao
boolean
getBool(String key, boolean def)
int
getInt(String key, int def)
Long
getLong(String key, Long def)
String
getString(String key, String def)
void
reinit()
Configuration
update(Configuration entity, Long userId)
Update an instance ofIDataProviderDao
Configuration
update(Configuration entity, Long userId, boolean deleted)
void
updateClusterAddresses(String addresses)
void
updateCsp()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.openmeetings.db.dao.IDataProviderDao
get
-
-
-
-
Method Detail
-
updateClusterAddresses
public void updateClusterAddresses(String addresses) throws UnknownHostException
- Throws:
UnknownHostException
-
forceGet
public Configuration forceGet(String key)
Retrieves Configuration regardless of its deleted status- Parameters:
key
- - key of theConfiguration
to get- Returns:
- correspondent
Configuration
or null
-
get
public List<Configuration> get(String... keys)
-
get
public Configuration get(String key)
-
getBool
public boolean getBool(String key, boolean def)
-
getInt
public int getInt(String key, int def)
-
get
public Configuration get(Long id)
Description copied from interface:IDataProviderDao
Get an instance of anIDataProviderDao
- Specified by:
get
in interfaceIDataProviderDao<Configuration>
- Parameters:
id
- - id of instance to retrieve- Returns:
- instance with the id gived
-
get
public List<Configuration> get(long start, long count)
Description copied from interface:IDataProviderDao
Get a list of instances ofIDataProviderDao
- Specified by:
get
in interfaceIDataProviderDao<Configuration>
- Parameters:
start
- - the start to range to retrievecount
- - maximum instance count to retrieve- Returns:
- list of instances in the range specified
-
get
public List<Configuration> get(String search, long start, long count, String sort)
Description copied from interface:IDataProviderDao
Get a list of instances ofIDataProviderDao
- Specified by:
get
in interfaceIDataProviderDao<Configuration>
- Parameters:
search
- - string search criteria to filter entitiesstart
- - the start to range to retrievecount
- - maximum instance count to retrievesort
- - column and sort order- Returns:
- list of instances in the range specified
-
count
public long count()
Description copied from interface:IDataProviderDao
Count the number of instances ofIDataProviderDao
- Specified by:
count
in interfaceIDataProviderDao<Configuration>
- Returns:
- count of instances
-
count
public long count(String search)
Description copied from interface:IDataProviderDao
Count the number of instances ofIDataProviderDao
- Specified by:
count
in interfaceIDataProviderDao<Configuration>
- Parameters:
search
- - string search criteria to filter entities- Returns:
- count of instances satisfying given search criteria
-
update
public Configuration update(Configuration entity, Long userId)
Description copied from interface:IDataProviderDao
Update an instance ofIDataProviderDao
- Specified by:
update
in interfaceIDataProviderDao<Configuration>
- Parameters:
entity
- - entity to be updateduserId
- - user performed update- Returns:
- - updated entity
-
update
public Configuration update(Configuration entity, Long userId, boolean deleted)
-
delete
public void delete(Configuration entity, Long userId)
Description copied from interface:IDataProviderDao
Delete an instance ofIDataProviderDao
- Specified by:
delete
in interfaceIDataProviderDao<Configuration>
- Parameters:
entity
- - entity to be deleteduserId
- - user performed delete
-
reinit
public void reinit()
-
updateCsp
public void updateCsp()
-
-