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 String
APP_RESOURCES_PREFIX
static String
APP_RESOURCES_SUFFIX
-
Constructor Summary
Constructors Constructor Description LabelDao()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
add(Locale l)
long
count()
Count the number of instances ofIDataProviderDao
long
count(String search)
Count the number of instances ofIDataProviderDao
static long
count(Locale l, String search)
static void
delete(Locale l)
static void
delete(Locale l, StringLabel entity)
void
delete(StringLabel entity, Long userId)
Delete an instance ofIDataProviderDao
StringLabel
get(long id)
List<StringLabel>
get(long start, long count)
Get a list of instances ofIDataProviderDao
StringLabel
get(Long id)
Get an instance of anIDataProviderDao
List<StringLabel>
get(String search, long start, long count, String order)
Get a list of instances ofIDataProviderDao
static List<StringLabel>
get(Locale l, String search, long start, long count, org.apache.wicket.extensions.markup.html.repeater.util.SortParam<String> sort)
static String
getLabelFileName(Locale l)
static OmLanguage
getLanguage(Long id)
static Long
getLanguage(Locale loc, Long def)
static Set<Map.Entry<Long,Locale>>
getLanguages()
static Locale
getLocale(Long id)
static OmLanguage
getOmLanguage(Locale loc, Long def)
static String
getString(String key, long langId)
static void
initLanguageMap()
static StringLabel
update(Locale l, StringLabel entity)
StringLabel
update(StringLabel entity, Long userId)
Update an instance ofIDataProviderDao
static void
upload(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:
get
in interfaceIDataProviderDao<StringLabel>
-
get
public StringLabel get(Long id)
Description copied from interface:IDataProviderDao
Get an instance of anIDataProviderDao
- Specified by:
get
in 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:IDataProviderDao
Get a list of instances ofIDataProviderDao
- Specified by:
get
in 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:IDataProviderDao
Get a list of instances ofIDataProviderDao
- Specified by:
get
in 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:IDataProviderDao
Count the number of instances ofIDataProviderDao
- Specified by:
count
in interfaceIDataProviderDao<StringLabel>
- 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<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:IDataProviderDao
Update an instance ofIDataProviderDao
- Specified by:
update
in 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:IDataProviderDao
Delete an instance ofIDataProviderDao
- Specified by:
delete
in 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)
-
-