Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Set up the map object for the back end
- Map<Integer, String> posMap = new HashMap<Integer, String>();
- // Get the approved mailers
- String[] mailerList = request.getParameterValues("approved");
- if (mailerList != null && mailerList.length > 0)
- {
- for(String mailer : mailerList)
- {
- posMap.put(Integer.parseInt(mailer), "Y");
- }
- }
- // reset the mailerList
- mailerList = null;
- // get the ignored mailers
- mailerList = request.getParameterValues("ignored");
- if (mailerList != null && mailerList.length > 0)
- {
- for(String mailer : mailerList)
- {
- posSampleMap.put(Integer.parseInt(mailer), "N");
- }
- }
- // only update POS if the map is not empty
- if(!posMap.isEmpty())
- {
- updateMapper.updatePOSSampling(posMap);
- }
- <update id="updatePOSSampling" parameterType="hashmap">
- UPDATE <table_name>
- SET sampling_enabled = ${myMapValue}
- WHERE mailer_name = ${myMapKey}
- </update>
Add Comment
Please, Sign In to add comment