Skip to content

Commit

Permalink
Merge pull request #263 from darshanasbg/charset-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
darshanasbg authored Oct 2, 2024
2 parents 7e8152e + ba6c8d9 commit 49dde04
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public void addNotificationTemplate(NotificationTemplate notificationTemplate, S
namedJdbcTemplate.executeInsert(INSERT_APP_NOTIFICATION_TEMPLATE_SQL, (preparedStatement -> {
preparedStatement.setString(TEMPLATE_KEY, locale.toLowerCase());
preparedStatement.setString(LOCALE, locale);
preparedStatement.setString(SUBJECT, notificationTemplate.getSubject());
preparedStatement.setString(BODY, notificationTemplate.getBody());
preparedStatement.setString(FOOTER, notificationTemplate.getFooter());
preparedStatement.setNString(3, notificationTemplate.getSubject());
preparedStatement.setNString(4, notificationTemplate.getBody());
preparedStatement.setNString(5, notificationTemplate.getFooter());
preparedStatement.setString(CONTENT_TYPE, notificationTemplate.getContentType());
preparedStatement.setString(TYPE_KEY, displayName.toLowerCase());
preparedStatement.setString(CHANNEL, channelName);
Expand All @@ -93,9 +93,9 @@ public NotificationTemplate getNotificationTemplate(String locale, String templa
notificationTemplate = namedJdbcTemplate.fetchSingleRecord(GET_APP_NOTIFICATION_TEMPLATE_SQL,
(resultSet, rowNumber) -> {
NotificationTemplate notificationTemplateResult = new NotificationTemplate();
notificationTemplateResult.setSubject(resultSet.getString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getString(BODY));
notificationTemplateResult.setFooter(resultSet.getString(FOOTER));
notificationTemplateResult.setSubject(resultSet.getNString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getNString(BODY));
notificationTemplateResult.setFooter(resultSet.getNString(FOOTER));
notificationTemplateResult.setContentType(resultSet.getString(CONTENT_TYPE));
notificationTemplateResult.setLocale(locale);
notificationTemplateResult.setType(templateType);
Expand Down Expand Up @@ -175,9 +175,9 @@ public List<NotificationTemplate> listNotificationTemplates(String templateType,
notificationTemplates = namedJdbcTemplate.executeQuery(LIST_APP_NOTIFICATION_TEMPLATES_BY_APP_SQL,
(resultSet, rowNumber) -> {
NotificationTemplate notificationTemplateResult = new NotificationTemplate();
notificationTemplateResult.setSubject(resultSet.getString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getString(BODY));
notificationTemplateResult.setFooter(resultSet.getString(FOOTER));
notificationTemplateResult.setSubject(resultSet.getNString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getNString(BODY));
notificationTemplateResult.setFooter(resultSet.getNString(FOOTER));
notificationTemplateResult.setContentType(resultSet.getString(CONTENT_TYPE));
notificationTemplateResult.setLocale(resultSet.getString(LOCALE));
notificationTemplateResult.setType(templateType.toLowerCase());
Expand Down Expand Up @@ -212,9 +212,9 @@ public void updateNotificationTemplate(NotificationTemplate notificationTemplate
try {
namedJdbcTemplate.executeUpdate(UPDATE_APP_NOTIFICATION_TEMPLATE_SQL,
preparedStatement -> {
preparedStatement.setString(SUBJECT, notificationTemplate.getSubject());
preparedStatement.setString(BODY, notificationTemplate.getBody());
preparedStatement.setString(FOOTER, notificationTemplate.getFooter());
preparedStatement.setNString(1, notificationTemplate.getSubject());
preparedStatement.setNString(2, notificationTemplate.getBody());
preparedStatement.setNString(3, notificationTemplate.getFooter());
preparedStatement.setString(CONTENT_TYPE, notificationTemplate.getContentType());
preparedStatement.setString(TEMPLATE_KEY, locale.toLowerCase());
preparedStatement.setString(TYPE_KEY, displayName.toLowerCase());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public void addNotificationTemplate(NotificationTemplate notificationTemplate, i
namedJdbcTemplate.executeInsert(INSERT_ORG_NOTIFICATION_TEMPLATE_SQL, (preparedStatement -> {
preparedStatement.setString(TEMPLATE_KEY, locale.toLowerCase());
preparedStatement.setString(LOCALE, locale);
preparedStatement.setString(SUBJECT, notificationTemplate.getSubject());
preparedStatement.setString(BODY, notificationTemplate.getBody());
preparedStatement.setString(FOOTER, notificationTemplate.getFooter());
preparedStatement.setNString(3, notificationTemplate.getSubject());
preparedStatement.setNString(4, notificationTemplate.getBody());
preparedStatement.setNString(5, notificationTemplate.getFooter());
preparedStatement.setString(CONTENT_TYPE, notificationTemplate.getContentType());
preparedStatement.setString(TYPE_KEY, displayName.toLowerCase());
preparedStatement.setString(CHANNEL, channelName);
Expand All @@ -91,9 +91,9 @@ public NotificationTemplate getNotificationTemplate(String locale, String templa
notificationTemplate = namedJdbcTemplate.fetchSingleRecord(GET_ORG_NOTIFICATION_TEMPLATE_SQL,
(resultSet, rowNumber) -> {
NotificationTemplate notificationTemplateResult = new NotificationTemplate();
notificationTemplateResult.setSubject(resultSet.getString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getString(BODY));
notificationTemplateResult.setFooter(resultSet.getString(FOOTER));
notificationTemplateResult.setSubject(resultSet.getNString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getNString(BODY));
notificationTemplateResult.setFooter(resultSet.getNString(FOOTER));
notificationTemplateResult.setContentType(resultSet.getString(CONTENT_TYPE));
notificationTemplateResult.setLocale(locale);
notificationTemplateResult.setType(templateType);
Expand Down Expand Up @@ -169,9 +169,9 @@ public List<NotificationTemplate> listNotificationTemplates(String templateType,
notificationTemplates = namedJdbcTemplate.executeQuery(LIST_ORG_NOTIFICATION_TEMPLATES_BY_TYPE_SQL,
(resultSet, rowNumber) -> {
NotificationTemplate notificationTemplateResult = new NotificationTemplate();
notificationTemplateResult.setSubject(resultSet.getString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getString(BODY));
notificationTemplateResult.setFooter(resultSet.getString(FOOTER));
notificationTemplateResult.setSubject(resultSet.getNString(SUBJECT));
notificationTemplateResult.setBody(resultSet.getNString(BODY));
notificationTemplateResult.setFooter(resultSet.getNString(FOOTER));
notificationTemplateResult.setContentType(resultSet.getString(CONTENT_TYPE));
notificationTemplateResult.setLocale(resultSet.getString(LOCALE));
notificationTemplateResult.setType(templateType.toLowerCase());
Expand Down Expand Up @@ -205,9 +205,9 @@ public void updateNotificationTemplate(NotificationTemplate notificationTemplate
try {
namedJdbcTemplate.executeUpdate(UPDATE_ORG_NOTIFICATION_TEMPLATE_SQL,
preparedStatement -> {
preparedStatement.setString(SUBJECT, notificationTemplate.getSubject());
preparedStatement.setString(BODY, notificationTemplate.getBody());
preparedStatement.setString(FOOTER, notificationTemplate.getFooter());
preparedStatement.setNString(1, notificationTemplate.getSubject());
preparedStatement.setNString(2, notificationTemplate.getBody());
preparedStatement.setNString(3, notificationTemplate.getFooter());
preparedStatement.setString(CONTENT_TYPE, notificationTemplate.getContentType());
preparedStatement.setString(TEMPLATE_KEY, locale.toLowerCase());
preparedStatement.setString(TYPE_KEY, displayName.toLowerCase());
Expand Down

0 comments on commit 49dde04

Please sign in to comment.