Пример #1
0
 /**
  * <br>
  * [機 能] 自動送信先の表示設定 <br>
  * [解 説] <br>
  * [備 考]
  *
  * @param paramMdl パラメータモデル
  * @param con コネクション
  * @throws SQLException SQL実行時例外
  */
 protected void _setAutoDestDisp(Sml250ParamModel paramMdl, Connection con) throws SQLException {
   UserBiz usrBiz = new UserBiz();
   SmlAccountDao sacDao = new SmlAccountDao(con);
   // To
   List<String> usrSidList = new ArrayList<String>();
   List<String> accSidList = new ArrayList<String>();
   List<LabelValueBean> labelList = new ArrayList<LabelValueBean>();
   String[] strSids = paramMdl.getSml250AutoDestToUsrSid();
   _splitSids(strSids, usrSidList, accSidList);
   labelList.addAll(
       usrBiz.getUserLabelList(con, usrSidList.toArray(new String[usrSidList.size()])));
   labelList.addAll(
       sacDao.selectSacSids2(
           accSidList.toArray(new String[accSidList.size()]), SmlAccountDao.JKBN_LIV));
   paramMdl.setSml250AutoDestToLabelList(labelList);
   // Cc
   usrSidList = new ArrayList<String>();
   accSidList = new ArrayList<String>();
   labelList = new ArrayList<LabelValueBean>();
   strSids = paramMdl.getSml250AutoDestCcUsrSid();
   _splitSids(strSids, usrSidList, accSidList);
   labelList.addAll(
       usrBiz.getUserLabelList(con, usrSidList.toArray(new String[usrSidList.size()])));
   labelList.addAll(
       sacDao.selectSacSids2(
           accSidList.toArray(new String[accSidList.size()]), SmlAccountDao.JKBN_LIV));
   paramMdl.setSml250AutoDestCcLabelList(labelList);
   // Bcc
   usrSidList = new ArrayList<String>();
   accSidList = new ArrayList<String>();
   labelList = new ArrayList<LabelValueBean>();
   strSids = paramMdl.getSml250AutoDestBccUsrSid();
   _splitSids(strSids, usrSidList, accSidList);
   labelList.addAll(
       usrBiz.getUserLabelList(con, usrSidList.toArray(new String[usrSidList.size()])));
   labelList.addAll(
       sacDao.selectSacSids2(
           accSidList.toArray(new String[accSidList.size()]), SmlAccountDao.JKBN_LIV));
   paramMdl.setSml250AutoDestBccLabelList(labelList);
 }
Пример #2
0
 /**
  * <br>
  * [機 能] DBから保管済みの自動送信先を読み込む <br>
  * [解 説] <br>
  * [備 考]
  *
  * @param paramModel パラメータモデル
  * @param con コネクション
  * @throws SQLException SQL実行時例外
  */
 public void __loadAuteDest(Sml250ParamModel paramModel, Connection con) throws SQLException {
   SmlAccountAutoDestDao sadDao = new SmlAccountAutoDestDao(con);
   for (int type = 0; type < 3; type++) {
     List<SmlAccountModel> sacModels =
         sadDao.getAutoDestAccounts(paramModel.getSmlAccountSid(), type);
     List<LabelValueBean> labelList = new ArrayList<LabelValueBean>();
     String[] sids = new String[sacModels.size()];
     for (int i = 0; i < sids.length; i++) {
       SmlAccountModel acc = sacModels.get(i);
       LabelValueBean bean = new LabelValueBean();
       if (acc.getUsrSid() > 0) {
         bean.setValue(String.valueOf(acc.getUsrSid()));
       } else {
         bean.setValue(GSConstSmail.SML_ACCOUNT_STR + String.valueOf(acc.getSacSid()));
       }
       bean.setLabel(acc.getSacName());
       labelList.add(bean);
       sids[i] = bean.getValue();
     }
     switch (type) {
       case GSConstSmail.SML_SEND_KBN_ATESAKI:
         paramModel.setSml250AutoDestToLabelList(labelList);
         paramModel.setSml250AutoDestToUsrSid(sids);
         break;
       case GSConstSmail.SML_SEND_KBN_CC:
         paramModel.setSml250AutoDestCcLabelList(labelList);
         paramModel.setSml250AutoDestCcUsrSid(sids);
         break;
       case GSConstSmail.SML_SEND_KBN_BCC:
         paramModel.setSml250AutoDestBccLabelList(labelList);
         paramModel.setSml250AutoDestBccUsrSid(sids);
         break;
       default:
     }
   }
 }