public class NewsDAO extends CommonDAO
con, dateFormat_DDMMYYYY, dateFormat_DDMMYYYY_HHMM, log, SQL_AND, SQL_DELETE, SQL_DESC, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE
Constructor and Description |
---|
NewsDAO(java.sql.Connection con) |
Modifier and Type | Method and Description |
---|---|
void |
deleteNews(int newsId) |
News |
getNews(int newsId) |
java.util.List<News> |
getNewsByUser(int userId,
boolean popupOnly) |
void |
searchNewsList(SearchResult<News> searchResult,
int userId,
java.lang.Boolean read,
java.lang.String text) |
void |
setNewsAllRead(int userId) |
void |
setNewsRead(int newsId,
int userId,
boolean value) |
int |
updateNews(News news) |
void |
updateNewsGroups(News news,
java.util.Set<java.lang.Integer> groupIds) |
void |
updateNewsUsers(News news,
java.util.Set<java.lang.Integer> userIds) |
addLikeSql, convertDateToSqlDate, convertDateToTimestamp, deleteById, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, updateColumn, updateIds, updateIds
public void searchNewsList(SearchResult<News> searchResult, int userId, java.lang.Boolean read, java.lang.String text) throws BGException
BGException
public News getNews(int newsId) throws BGException
BGException
public java.util.List<News> getNewsByUser(int userId, boolean popupOnly) throws BGException
BGException
public int updateNews(News news) throws BGException
BGException
public void updateNewsUsers(News news, java.util.Set<java.lang.Integer> userIds) throws BGException
BGException
public void updateNewsGroups(News news, java.util.Set<java.lang.Integer> groupIds) throws BGException
BGException
public void setNewsRead(int newsId, int userId, boolean value) throws java.sql.SQLException
java.sql.SQLException
public void setNewsAllRead(int userId) throws java.sql.SQLException
java.sql.SQLException
public void deleteNews(int newsId) throws BGException
BGException