Class LabelDao
- java.lang.Object
-
- org.apache.openmeetings.db.dao.label.LabelDao
-
- All Implemented Interfaces:
IDataProviderDao<StringLabel>
public class LabelDao extends Object implements IDataProviderDao<StringLabel>
CRUD operations forStringLabel- Author:
- solomax, swagner
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPP_RESOURCES_PREFIXstatic StringAPP_RESOURCES_SUFFIX
-
Constructor Summary
Constructors Constructor Description LabelDao()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidadd(Locale l)longcount()Count the number of instances ofIDataProviderDaolongcount(String search)Count the number of instances ofIDataProviderDaostatic longcount(Locale l, String search)static voiddelete(Locale l)static voiddelete(Locale l, StringLabel entity)voiddelete(StringLabel entity, Long userId)Delete an instance ofIDataProviderDaoStringLabelget(long id)List<StringLabel>get(long start, long count)Get a list of instances ofIDataProviderDaoStringLabelget(Long id)Get an instance of anIDataProviderDaoList<StringLabel>get(String search, long start, long count, String order)Get a list of instances ofIDataProviderDaostatic List<StringLabel>get(Locale l, String search, long start, long count, org.apache.wicket.extensions.markup.html.repeater.util.SortParam<String> sort)static StringgetLabelFileName(Locale l)static OmLanguagegetLanguage(Long id)static LonggetLanguage(Locale loc, Long def)static Set<Map.Entry<Long,Locale>>getLanguages()static LocalegetLocale(Long id)static OmLanguagegetOmLanguage(Locale loc, Long def)static StringgetString(String key, long langId)static voidinitLanguageMap()static StringLabelupdate(Locale l, StringLabel entity)StringLabelupdate(StringLabel entity, Long userId)Update an instance ofIDataProviderDaostatic voidupload(Locale l, InputStream is)
-
-
-
Field Detail
-
APP_RESOURCES_PREFIX
public static final String APP_RESOURCES_PREFIX
- See Also:
- Constant Field Values
-
APP_RESOURCES_SUFFIX
public static final String APP_RESOURCES_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
initLanguageMap
public static void initLanguageMap()
-
upload
public static void upload(Locale l, InputStream is) throws Exception
- Throws:
Exception
-
get
public StringLabel get(long id)
- Specified by:
getin interfaceIDataProviderDao<StringLabel>
-
get
public StringLabel get(Long id)
Description copied from interface:IDataProviderDaoGet an instance of anIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<StringLabel>- Parameters:
id- - id of instance to retrieve- Returns:
- instance with the id gived
-
get
public List<StringLabel> get(long start, long count)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<StringLabel>- Parameters:
start- - the start to range to retrievecount- - maximum instance count to retrieve- Returns:
- list of instances in the range specified
-
get
public List<StringLabel> get(String search, long start, long count, String order)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<StringLabel>- Parameters:
search- - string search criteria to filter entitiesstart- - the start to range to retrievecount- - maximum instance count to retrieveorder- - column and sort order- Returns:
- list of instances in the range specified
-
getLanguage
public static OmLanguage getLanguage(Long id)
-
getOmLanguage
public static OmLanguage getOmLanguage(Locale loc, Long def)
-
get
public static List<StringLabel> get(Locale l, String search, long start, long count, org.apache.wicket.extensions.markup.html.repeater.util.SortParam<String> sort)
-
count
public long count()
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<StringLabel>- Returns:
- count of instances
-
count
public long count(String search)
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<StringLabel>- Parameters:
search- - string search criteria to filter entities- Returns:
- count of instances satisfying given search criteria
-
update
public StringLabel update(StringLabel entity, Long userId)
Description copied from interface:IDataProviderDaoUpdate an instance ofIDataProviderDao- Specified by:
updatein interfaceIDataProviderDao<StringLabel>- Parameters:
entity- - entity to be updateduserId- - user performed update- Returns:
- - updated entity
-
update
public static StringLabel update(Locale l, StringLabel entity) throws Exception
- Throws:
Exception
-
delete
public void delete(StringLabel entity, Long userId)
Description copied from interface:IDataProviderDaoDelete an instance ofIDataProviderDao- Specified by:
deletein interfaceIDataProviderDao<StringLabel>- Parameters:
entity- - entity to be deleteduserId- - user performed delete
-
delete
public static void delete(Locale l, StringLabel entity) throws Exception
- Throws:
Exception
-
delete
public static void delete(Locale l)
-
-