List of usage examples for org.springframework.dao DataAccessException getMessage
@Override
@Nullable
public String getMessage()
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateCalendarItemsLabelKey(String entityReference, String oldLabelKey, String newLabelKey) { if (log.isDebugEnabled()) { log.debug("updateCalendarItemTime( " + entityReference + "," + oldLabelKey + "," + newLabelKey + ")"); }//from w w w . j a v a 2 s .c om try { getJdbcTemplate().update(getStatement("update.CalendarItemsLabelKey.entityReference.oldLabelKey"), new Object[] { newLabelKey, entityReference, oldLabelKey }); return true; } catch (DataAccessException ex) { log.warn( "updateCalendarsItemLabelKey: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateCalendarItemTitle(Long id, String newTitle) { if (log.isDebugEnabled()) { log.debug("updateCalendarItemTitle( " + id + "," + newTitle + ")"); }/*from w ww . jav a 2 s . c om*/ try { getJdbcTemplate().update(getStatement("update.CalendarItem.title"), new Object[] { newTitle, id }); return true; } catch (DataAccessException ex) { log.warn("updateCalendarItemTitle: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateCalendarLink(CalendarLink calendarLink) { if (log.isDebugEnabled()) { log.debug("updateCalendarLink( " + calendarLink.toString() + ")"); }//from ww w . j av a 2 s . c o m // update dash_calendar_link set person_id=?, item_id=?, context_id=?, hidden=?, sticky=? where id=? try { getJdbcTemplate().update(getStatement("update.CalendarLink"), new Object[] { calendarLink.getPerson().getId(), calendarLink.getCalendarItem().getId(), calendarLink.getContext().getId(), calendarLink.isHidden(), calendarLink.isSticky(), calendarLink.getId() }); return true; } catch (DataAccessException ex) { log.warn("updateCalendarLink: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateContextTitle(String contextId, String newContextTitle) { if (log.isDebugEnabled()) { log.debug("updateContextTitle( " + contextId + "," + newContextTitle + ")"); }//w ww .j a v a 2s .co m try { getJdbcTemplate().update(getStatement("update.Context.title"), new Object[] { newContextTitle, contextId }); return true; } catch (DataAccessException ex) { log.warn("updateContextTitle: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateNewsItemTime(Long id, Date newTime, String newGroupingIdentifier) { if (log.isDebugEnabled()) { log.debug("updateNewsItemTime( " + id + "," + newTime + ")"); }//w ww.ja va2 s . co m try { getJdbcTemplate().update(getStatement("update.NewsItem.newsTime"), new Object[] { newTime, newGroupingIdentifier, id }); return true; } catch (DataAccessException ex) { log.warn("updateNewsItemTime: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateNewsItemTitle(Long id, String newTitle, Date newNewsTime, String newLabelKey, String newGroupingIdentifier) { if (log.isDebugEnabled()) { log.debug("updateNewsItemTitle( " + id + "," + newTitle + ")"); }/*from w ww.java 2s.co m*/ if (id == null || newTitle == null || newNewsTime == null || newLabelKey == null) { log.warn("updateNewsItemTitle() called with null values"); return false; } try { getJdbcTemplate().update(getStatement("update.NewsItem.title"), new Object[] { newTitle, newNewsTime, newLabelKey, newGroupingIdentifier, id }); return true; } catch (DataAccessException ex) { log.warn("updateNewsItemTitle: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateNewsLink(NewsLink newsLink) { if (log.isDebugEnabled()) { log.debug("updateNewsLink( " + newsLink.toString() + ")"); }//from ww w . j a va 2s . c o m // update dash_news_link set person_id=?, item_id=?, context_id=?, hidden=?, sticky=? where id=? try { getJdbcTemplate().update(getStatement("update.NewsLink"), new Object[] { newsLink.getPerson().getId(), newsLink.getNewsItem().getId(), newsLink.getContext().getId(), newsLink.isHidden(), newsLink.isSticky(), newsLink.getId() }); return true; } catch (DataAccessException ex) { log.warn("updateNewsLink: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateRepeatingCalendarItemFrequency(String entityReference, String frequency) { if (log.isDebugEnabled()) { log.debug("updateRepeatingCalendarItemFrequency( " + entityReference + "," + frequency + ")"); }/* www. jav a 2 s. c o m*/ try { getJdbcTemplate().update(getStatement("update.RepeatingEventsFrequency.entityReference"), new Object[] { frequency, entityReference }); return true; } catch (DataAccessException ex) { log.warn("updateRepeatingCalendarItemFrequency: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateRepeatingCalendarItemsLabelKey(String entityReference, String oldLabelKey, String newLabelKey) {/*w w w . java 2 s . co m*/ if (log.isDebugEnabled()) { log.debug("updateRepeatingCalendarItemsLabelKey( " + entityReference + "," + oldLabelKey + "," + newLabelKey + ")"); } try { getJdbcTemplate().update(getStatement("update.RepeatingEventsLabelKey.entityReference.oldLabelKey"), new Object[] { newLabelKey, entityReference, oldLabelKey }); return true; } catch (DataAccessException ex) { log.warn("updateRepeatingCalendarItemsLabelKey: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }
From source file:org.sakaiproject.dash.dao.impl.DashboardDaoImpl.java
public boolean updateRepeatingCalendarItemTime(String entityReference, Date newFirstTime, Date newLastTime) { if (log.isDebugEnabled()) { log.debug("updateRepeatingCalendarItemTime( " + entityReference + "," + newFirstTime + "," + newLastTime + ")"); }/*from w w w . j av a2s . c o m*/ try { getJdbcTemplate().update(getStatement("update.RepeatingEventsTime.entityReference"), new Object[] { newFirstTime, newLastTime, entityReference }); return true; } catch (DataAccessException ex) { log.warn("updateRepeatingCalendarItemTime: Error executing query: " + ex.getClass() + ":" + ex.getMessage()); return false; } }