18. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/6/2017 8:32:14 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

18.1 Files compared

# Location File Last Modified
1 HC 837 Compliance 05122017.zip\HC 837 Compliance 05122017\FPPS_app\FPPS_app\src\hot\gov\va\med\fee\claim ClaimPaymentBean.java Mon May 9 19:11:54 2016 UTC
2 HC 837 Compliance 05122017.zip\HC 837 Compliance 05122017\FPPS_app\FPPS_app\src\hot\gov\va\med\fee\claim ClaimPaymentBean.java Wed Jul 5 13:07:57 2017 UTC

18.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 2044
Changed 1 2
Inserted 0 0
Removed 0 0

18.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

18.4 Active regular expressions

No regular expressions were active.

18.5 Comparison detail

  1   package go v.va.med.f ee.claim;
  2  
  3   import sta tic org.jb oss.seam.S copeType.S ESSION;
  4  
  5   import jav a.math.Big Decimal;
  6   import jav a.text.Dec imalFormat ;
  7   import jav a.text.Sim pleDateFor mat;
  8   import jav a.util.Arr ayList;
  9   import jav a.util.Dat e;
  10   import jav a.util.Ite rator;
  11   import jav a.util.Lis t;
  12  
  13   import jav ax.ejb.Sta teful;
  14  
  15   import org .jboss.sea m.annotati ons.Logger ;
  16   import org .jboss.sea m.annotati ons.Name;
  17   import org .jboss.sea m.annotati ons.Scope;
  18   import org .jboss.sea m.annotati ons.Destro y;
  19   import org .jboss.sea m.log.Log;
  20  
  21   import jav ax.ejb.Rem ove;
  22   import jav ax.persist ence.Entit yManager;
  23   import jav ax.persist ence.Persi stenceCont ext;
  24   import jav ax.persist ence.Persi stenceCont extType;
  25   import jav ax.persist ence.Query ;
  26  
  27  
  28   /**
  29    * ClaimPa ymentBean  class.
  30    * This cl ass implem ents the C laimPaymen t interfac e and hand les the ca lculation  and displa y of
  31    * all of  the new pa yment fiel ds in the  GUI.
  32    * @author  Bill Blac kmon
  33    * @versio n R1.25.1
  34    * 
  35    * HAPE PO R VA DO# 1 18-11-D-10 09, TO#118 -1009-0001 ; HARRIS
  36    */
  37   @SuppressW arnings("u nused")
  38   @Stateful
  39   @Name("cla imPaymentB ean")
  40   @Scope(SES SION)
  41  
  42  
  43  
  44   public cla ss ClaimPa ymentBean  implements  ClaimPaym ent {
  45  
  46           /* * The log.  */
  47       @Logge r
  48       privat e Log log;
  49  
  50  
  51       /** Th e em. */
  52       @Persi stenceCont ext(unitNa me = "FPPS _Owner", t ype=Persis tenceConte xtType.EXT ENDED)
  53       privat e EntityMa nager em;
  54       
  55       
  56       // val ues for li ne items
  57       /**
  58         fpl. paid_amoun t
  59         fpl. adjustment _reason_co de_1,
  60         fpl. adjustment _amount_1,
  61         fpl. adjustment _reason_co de_2,
  62         fpl. adjustment _amount_2, "
  63        */
  64       
  65  
  66   /**
  67    * require d fields u sed in dis play:
  68    * adjReas onCodeOne
  69      adjAmtS tring
  70      lineIte mCount
  71      checkNu mber
  72      paidAmo untFormatt ed
  73      treasur yPaymentDa teFormatte d
  74    */
  75  
  76       privat e String c heckNumber ="";
  77       privat e String a djReasonCo deOne="";
  78       privat e String a djAmtStrin g="";
  79       privat e String t reasuryPay mentDateFo rmatted =  "";
  80       privat e String p aidAmountF ormatted=" ";
  81       privat e int line ItemCount;
  82       privat e java.sql .Date trea suryPaymen tDate;
  83       privat e BigDecim al treasur yPaymentAm ount;
  84       privat e BigDecim al adjAmtO ne;
  85       privat e BigDecim al paidAmo unt;
  86       
  87       
  88       privat e java.sql .Timestamp  lineItemT reasuryPay mentDate;
  89       // new  value to  display St ring value  in case a bove is nu ll...
  90       privat e String l ineItemTre asuryPayme ntDateForm atted="";
  91       
  92       
  93       privat e String l ineItemPai dAmountFor matted="";
  94       privat e String l ineItemChe ckNumber=" ";
  95       privat e String l ineItemAdj Amts="";
  96       privat e String l ineItemCod es="";
  97  
  98  
  99       Simple DateFormat  formatter  = new Sim pleDateFor mat("MM/dd /yyyy");
  100       Decima lFormat df  = new Dec imalFormat ("$#0.00") ;
  101  
  102  
  103       privat e long cla imIndex;
  104  
  105       /**
  106        * @au thor Bill  Blackmon
  107        */
  108       public  ClaimPaym entBean(){ }
  109  
  110  
  111       /**
  112        * Con structor
  113        * @au thor Bill  Blackmon
  114        * @pa ram em Ent ityManager  instance
  115        * @pa ram claimI ndex curre nt claim b eing proce ssed
  116        * @si nce 4/30/2 013
  117        * 
  118        */
  119  
  120       public  ClaimPaym entBean(lo ng claimIn dex, Entit yManager e m) {
  121  
  122                                      this.em  = em;
  123                                               this.claim Index=clai mIndex;
  124  
  125                                               setAdditio nalInfoOne (claimInde x);
  126                                               setAdditio nalInfoTwo (claimInde x);
  127  
  128  
  129       }   //  end const r()
  130  
  131       /**
  132        * FIE LDS IN DIS PLAY FOR M ETHOD BELO W..
  133   {_claimLin eItem.clai mPaymentBe an.lineIte mTreasuryP aymentDate }">
  134   {_claimLin eItem.clai mPaymentBe an.lineIte mPaidAmoun t}">
  135   #{_claimLi neItem.cla imPaymentB ean.checkN umber}" />
  136   #{_claimLi neItem.cla imPaymentB ean.lineIt emAdjAmtTw o}" >
  137   #{_claimLi neItem.cla imPaymentB ean.adjRea sonCodeOne }"></h:out putText>
  138  
  139  
  140        */
  141  
  142       /**
  143        * Thi s method s ets inform ation for  display on  the 'Addi tional Inf o' tab
  144        * @pa ram claimI ndexId
  145          * @author 
D NS     BLACKW
  146        * @si nce 4/18/2 013
  147        * @pa ram claimI ndexId
  148        */
  149       public  void setA dditionalI nfoTwo(lon g claimInd exId) {
  150  
  151           Qu ery q;
  152                List<?>  l;
  153                Iterator <?> it;
  154                StringBu ffer sChec kNumber =  new String Buffer();
  155                StringBu ffer sAmt  = new Stri ngBuffer() ;
  156                StringBu ffer sDate  = new Str ingBuffer( );
  157                String t emp = "";
  158                final St ring COMMA =", ";
  159                BigDecim al paidAmo unt=null;
  160  
  161   /** origin al **/
  162   /**          
  163           St ring sql =  "select "  +
  164                                      " check_ number, su m(l.paid_a mount), tr unc(check_ date) " +
  165                                               " from " +
  166                                                   " fee_ claim_paym ents f, fe e_claim_pa yment_line s l " +
  167                                                " where "  +
  168                                                "   f.cla im_index =  " + claim IndexId +  " and " +
  169                                                 "  F.FEE _CLAIM_PAY MENT_ID =  L.FEE_CLAI M_PAYMENT_ ID " +
  170                                               " group by  " +
  171                                                   " trun c(check_da te),check_ number " +
  172                                               " order by  " +
  173                                                "   trunc (check_dat e), check_ number ";
  174   **/
  175                
  176   // NEW - 7 /11
  177  
  178   /**
  179    * 
  180   Treasury P ayment Dat e (PD):
  181    
  182   03/02/2011  
  183  
  184  
  185  
  186   Total Paid  Amt per P D:
  187    
  188   $1079.83 
  189  
  190  
  191  
  192   Check/EFT/ TRN:
  193                
  194    */
  195    String sq l = " sele ct " + 
  196       " paym ent_tracki ng_number,  " +    
  197       " sum( paid_amoun t), " + 
  198       " trun c(treasury _payment_d ate) " +
  199   " from " +  
  200       " clai m_payment  " + 
  201   " where " 
  202       " clai m_index =  " + claimI ndexId + "  " +
  203   " group by  " +     
  204           "  payment_tr acking_num ber,trunc( treasury_p ayment_dat e) ";    
  205  
  206  
  207  
  208            t ry {
  209   // System. out.printl n("setAddi tionalInfo Two() line  level inf o - SQL IS : " + sql) ;
  210  
  211                                                                       q = this .em.create NativeQuer y(sql);
  212                                                                       l = q.ge tResultLis t();
  213                                                                       it = l.i terator();
  214                                                                       int coun t=0;
  215  
  216                                                                       while (i t.hasNext( )) {
  217                                                                          count ++;
  218                                                                          Objec t[] row =  (Object[])  it.next() ;
  219  
  220                                                                          // "  trunc(chec k_date), c heck_numbe r,   " +
  221                                                                          temp= "";
  222                                                                          
  223                                                                          
  224   // TO DO:  CHECK FOR  NULL VALUE S EVERYWHE RE - CLAIM  86920705  IS BREAKIN G THE APP. .....                                                                           
  225                                                                          
  226                                                                          
  227                                                                          if(ro w != null)  {
  228                                                                                   // chec kNumber
  229                                                                                   // view Claim.clai mPaymentBe an.checkNu mber
  230                                                                                   if(row[ 0] != null ) {
  231                                                                                            temp=(Str ing) row[0 ];
  232                                                                                            sCheckNum ber.append (temp+COMM A);
  233   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () CheckNu mber is: "  + sCheckN umber.toSt ring());
  234                                                                                   }       else { //  end row[0]
  235                                                                                            
  236                                                                                            
  237   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () - check Number is  null: sett ing to emp ty String" );
  238                                                                                                            sChe ckNumber.s etLength(0 );
  239                                                                                            
  240                                                                                            
  241                                                                                   }
  242  
  243                                                                                   if(row[ 1] != null ) {
  244                                                                                            
  245                                                                                            try {
  246                                                                                                                     paidAm ount = (Bi gDecimal)  row[1];
  247                                                                                                                     if( (p aidAmount. floatValue () > 0.00)  || (paidA mount.floa tValue() <  0.00) ||  (paidAmoun t.floatVal ue() == 0. 00) ) {
  248                                                                                                                                               te mp  = df.f ormat(paid Amount.flo atValue()) ;
  249                                                                                                                                               sA mt.append( temp+COMMA );
  250                                                                                                                                      
  251                                                                                            }catch(Ex ception ex ) {
  252   System.out .println(" ClaimPayme ntBean.set Additional InfoTwo()   ERROR WIT H paid amo unt: " + e x.getMessa ge());
  253                                                                                                    e x.printSta ckTrace();
  254                                                                                            }
  255                                                                                   }       else { 
  256                                                                                            
  257   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () - paid  amount is  null....." );                                                                                             
  258                                                                                            // end ro w[1]
  259                                                                                   }
  260  
  261                                                                                   // trun c(check_da te)
  262                                                                                   // view Claim.clai mPaymentBe an.treasur yPaymentDa teFormatte d
  263                                                                                   if(row[ 2] != null ) {
  264                                                                                            try {
  265                                                                                                                     java.s ql.Timesta mp x = (ja va.sql.Tim estamp) ro w[2];
  266                                                                                                                     temp =  formatter .format(x) ;
  267                                                                                                                     sDate. append(tem p+COMMA);
  268   // System. out.printl n("formatt ed date is : " + sDat e);
  269                                                                                            } catch(E xception e x) {
  270                                                                                                    S ystem.out. println("E RROR WITH  paymentDat e: " + ex. getMessage ());
  271                                                                                                    e x.printSta ckTrace();
  272                                                                                            }
  273  
  274                                                                                   } else  {
  275                                                                                            
  276   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () - check  date is n ull");  
  277  
  278                                                                                            
  279                                                                                            
  280                                                                                   }
  281  
  282                                                                          }       // end i f
  283  
  284                                                                       } // end  while
  285  
  286  
  287                                                                                           this.lineI temCount=c ount;
  288  
  289   // THIS BL OWS UP WHE N VALUES A RE NULL... .......... .                                                                                    
  290                                                                                           if(count >  0) {
  291                                                                                                   tr y {
  292                                                                                                            
  293                                                                                                            // I F ANY OF T HESE ARE S ET TO EMPT Y STRING,  LENGTH=O,  SKIP PROCE SSING..
  294                                                                                                            if(s CheckNumbe r.length()  > 0) {
  295                                                                                                                     sCheck Number=new  StringBuf fer(sCheck Number.del eteCharAt( sCheckNumb er.length( )-2));
  296                                                                                                            }
  297                                                                                                            
  298                                                                                                            if(s Amt.length () > 0) {
  299                                                                                                                     sAmt=n ew StringB uffer(sAmt .deleteCha rAt(sAmt.l ength()-2) );
  300                                                                                                            }
  301                                                                                                            
  302                                                                                                            if(s Date.lengt h() > 0) {
  303                                                                                                                     sDate= new String Buffer(sDa te.deleteC harAt(sDat e.length() -2));
  304                                                                                                            }
  305                                                                                                            
  306                                                                                                   }  catch(Inde xOutOfBoun dsExceptio n  iob) {
  307                                                                                                             //  System.out .println(" ClaimPayme ntBean.set Additional InfoTwo()  ERROR: " +  iob.getMe ssage());
  308                                                                                            // System .out.print ln("ClaimP aymentBean .setAdditi onalInfoTw o() claim  index is:  " + claimI ndexId);
  309                                                                                             iob.prin tStackTrac e();
  310                                                                                             log.erro r(iob.getM essage(),  iob);
  311                                                                                                   }  catch(Exce ption x) {
  312                                                                                                            // S ystem.out. println("C laimPaymen tBean.setA dditionalI nfoTwo() E RROR: " +  x.getMessa ge());
  313                                                                                           // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () claim i ndex is: "  + claimIn dexId);
  314                                                                                           // x.print StackTrace ();
  315                                                                                            log.error (x.getMess age(), x);
  316                                                                                                   }
  317                                                                                           }
  318  
  319  
  320   // HANDLE  NULLS                                                                                
  321                                                                                           this.check Number=sCh eckNumber. toString() ;
  322   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () - CHECK  NUMBER ST RING IS: "  + this.ch eckNumber) ;
  323  
  324   // HANDLE  NULLS
  325                                                                                           this.paidA mountForma tted=sAmt. toString() ;
  326   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () AMT STR ING IS: "  + this.pai dAmountFor matted);
  327  
  328                                                                                          
  329   // HANDLE  NULLS                                                                                
  330                                                                                          
  331                                                                                           this.treas uryPayment DateFormat ted=sDate. toString() ;
  332   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoTwo () - treas uryPayment Date is: "  + this.tr easuryPaym entDateFor matted);
  333  
  334                                            }c atch(Excep tion ex) {
  335                                                 System.o ut.println ("ClaimPay mentBean.s etAddition alInfoTwo( ) ERROR: "  + ex.getM essage());
  336                                                 System.o ut.println ("ClaimPay mentBean.s etAddition alInfoTwo( ) claim in dex is: "  + claimInd exId);
  337                                                 ex.print StackTrace ();
  338                                                 log.erro r(ex.getMe ssage(), e x);
  339                                            }
  340  
  341  
  342       }   //  end setAd ditionalIn foOne()
  343  
  344       public  BigDecima l getPaidA mount() {
  345                    retu rn paidAmo unt;
  346           }
  347  
  348  
  349           /* *
  350        * Pop ulates CAR C and Tota lAmtPerCar c on Addit ional Tab
  351        * @pa ram claimI ndexId
  352        * @au thor Bill  Blackmon
  353        * @si nce 4/18/2 013
  354        */
  355  
  356       public  void setA dditionalI nfoOne(lon g claimInd exId) {
  357  
  358           Qu ery q;
  359                List<?>  l;
  360                Iterator <?> it;
  361                StringBu ffer sCode  = new Str ingBuffer( );
  362                StringBu ffer sAmt  = new Stri ngBuffer() ;
  363                final St ring COMMA =", ";
  364                String c urCode = " ";
  365                String p revCode =  "";
  366                float cu rAmt = 0;
  367                float pr evAmt = 0;
  368  
  369  
  370                int recC ount = 0;
  371  
  372                boolean  bSameCode  = false;
  373  
  374   /** NEW -  7/11 **/
  375    
  376     String s ql = " sel ect " + 
  377       " sum( adjustment _amount),  CPRA.ADJUS TMENT_REAS ON_CD " + 
  378   " from " +
  379       " clai m_proc_rec _adjust cp ra, claim_ proc_recon  c " +
  380   " where "  +
  381       " c.cl aim_proc_r ec_id = cp ra.claim_p roc_rec_id  and " +
  382       " clai m_index =   " + claim IndexId +  " group by  cpra.adju stment_rea son_cd ";
  383            t ry {
  384  
  385                                                                       q = this .em.create NativeQuer y(sql);
  386                                                                       l = q.ge tResultLis t();
  387                                                                       it = l.i terator();
  388  
  389                                                                       while (i t.hasNext( ))
  390                                                                       {
  391  
  392                                                                         recCou nt++;
  393  
  394                                                                          Objec t[] row =  (Object[])  it.next() ;
  395  
  396   // TO DO:  CHECK FOR  NULL VALUE S FOR EACH  FIELD.... .......... data is ga rbage.
  397                                                                          // if  the row i s not null .....
  398                                                                          if(ro w != null)
  399                                                                          {
  400  
  401                                                                                   // if t he first v alue in th e row is n ot null
  402                                                                                   if(row[ 0] != null )
  403                                                                                   {
  404                                                                                                    / / if the a mount is >  0 do it.. ...
  405                                                                                            BigDecima l adjAmt =  (BigDecim al) row[0] ;
  406   // TEST FO R 0 VALUES ......
  407                                                                                            // if the  value of  the item i s not 0 -  INCLUDE NE GATIVE AMO UNTS - all  further p rocessing  depends on  this valu e
  408                                                                                            if(adjAmt .floatValu e() != 0.0 0)
  409                                                                                            {
  410                                                                                                   re cCount++;
  411  
  412                                                                                                            curA mt = adjAm t.floatVal ue();
  413                                                                                                            // S ystem.out. println("T op - new a mt is: " +  curAmt);
  414  
  415                                                                                                            if(r ow[1] != n ull) {
  416                                                                                                                              curCode= (String) r ow[1];
  417  
  418  
  419                                                                                                                              if(recCo unt != 1)  {
  420  
  421   // System. out.printl n("setAddi tionalInfo One() -New  row/code  - prev and  current c odes are n ow: " + cu rCode + ",  " + prevC ode);
  422                                                                                                                                                                           if(!cur Code.equal sIgnoreCas e(prevCode ) ) {
  423                                                                                                                                                                                    sCode.app end(curCod e+COMMA);
  424   // System. out.printl n("setAddi tionalInfo One() -New  Code foun d - sCode  is: " + sC ode.toStri ng());
  425                                                                                                                                                                           } else  {       //  for testi ng...
  426                                                                                                                                                                                   // SET FLA G FOR PROC ESSING AT  END OF REC ORD READ
  427                                                                                                                                                                                                    bSam eCode=true ;
  428   /**
  429   System.out .println(" setAdditio nalInfoOne () - SAME  CODE FOUND ! - codes  are: .....  - cur cod e is: " +  curCode +  ", prev co de is: " +  prevCode) ;
  430   System.out .println(" setAdditio nalInfoOne () - SAME  CODE FOUND ! - amts a re: ...... .cur amt i s: " + cur Amt + ", p rev amt is : " + prev Amt);
  431   System.out .println(" setAdditio nalInfoOne () - SAME  CODE.....c urrent amo unt String  is: " + s Amt.toStri ng());
  432   **/
  433                                                                                                                                                                           }
  434                                                                                                                                                                  } els e {        // first r ecord - ap pend it... .
  435                                                                                                                                                                           // if t his is the  first rec ord append  it regard less.....
  436  
  437                                                                                                                                                                           // WATC H THIS FOR  EXTRANEOU S ADDITION .....
  438                                                                                                                                                                           sCode.a ppend(curC ode+COMMA) ;
  439   // System. out.printl n("setAddi tionalInfo One() - FI RST RECORD  - appendi ng code... .sCode is:  " + sCode .toString( ));
  440                                                                                                                                                                  }       // end r ecCount if
  441  
  442                                                                                                                 } else {
  443                                                                                                                     
  444   // System. out.printl n("setAddi tionalInfo One() - Cl aimPayment Bean.setAd ditionalIn foOne() -  curCode IS  NULL");                                                                                                              
  445                                                                                                                 } // end r ow[1] chec k....
  446  
  447                                                                                                            // c heck for b SameCode f lag
  448                                                                                                            // i f flag is  true, sum  prevAmt an d curAmt a nd append  to String
  449                                                                                                            // o therwise,  just appen d curAmt
  450                                                                                                            if(b SameCode)  {
  451  
  452  
  453                                                                                                                                                        Stri ng out = s Amt.toStri ng();
  454  
  455                                                                                                                                                        int  len = out. length();
  456                                                                                                                                                        int  pos = 0;
  457  
  458                                                                                                                                                        for  (int i = o ut.length( ); (i = ou t.lastInde xOf(COMMA,  i - 1)) ! = -1; ) {
  459                                                                                                                                                              // System .out.print ln("Positi on of COMM A from the  end is: "  + i);
  460                                                                                                                                                              pos = i;
  461                                                                                                                                                         }
  462  
  463                                                                                                                                                        Stri ng sub = o ut.substri ng(0, pos+ 1);
  464                                                                                                                                                        // S ystem.out. println("N EW OUTPUT  STRING IS:  " + sub);
  465  
  466  
  467                                                                                                                                                        sAmt  = new Str ingBuffer( sub);
  468  
  469                                                                                                                                                        // S ystem.out. println("N EW sAmt St ringBuffer  is: " + s Amt.toStri ng());
  470  
  471                                                                                                                                                        // S ystem.out. println("b SameCode c heck - cur Amt and pr evAmts are : " + curA mt + "; "  + prevAmt) ;
  472                                                                                                                                                        floa t sum = pr evAmt+curA mt;
  473                                                                                                                                                        // S ystem.out. println("b SameCode c heck - tot al for cur Amt and pr evAmt is:  " + sum);
  474  
  475                                                                                                                                                        this .adjAmtOne  = new Big Decimal(su m);
  476                                                                                                                                                        // S ystem.out. println("b SameCode c heck - new  amt is: "  + this.ad jAmtOne)         ;
  477  
  478  
  479                                                                                                                                                        Stri ng x = df. format(thi s.adjAmtOn e);
  480  
  481                                                                                                                                                        // d ress it
  482                                                                                                                                                                 sAmt.a ppend(" "  + x + COMM A);
  483  
  484  
  485  
  486                                                                                                            } el se {         // proce ss and for mat the cu rAmt here. ...
  487                                                                                                                                                        this .adjAmtOne  = new Big Decimal(cu rAmt);
  488   // System. out.printl n("setAddi tionalInfo One() - bS ameCode ch eck -NOT T HE SAME ne w amt is:  " + this.a djAmtOne)    ;
  489                                                                                                                                                        Stri ng y = df. format(thi s.adjAmtOn e);
  490                                                                                                                                                         //  dress it
  491                                                                                                                                                        sAmt .append(y+ COMMA);
  492   // System. out.printl n("setAddi tionalInfo One() - EN D OF adjAm t processi ng - sAmt  is now: "  + sAmt.toS tring());
  493                                                                                                            }        // end  bSameCode  check....
  494  
  495  
  496  
  497                                                                                                                                        //  reset  values .. ...
  498                                                                                                                                        prevAmt =  curAmt;
  499                                                                                                                                        prevCode  = curCode;
  500  
  501                                                                                                                                                        // s anity chec k
  502   /**                                                                                                                                  
  503   System.out .println(" setAdditio nalInfoOne () - RECOR D COUNT is : " + recC ount);
  504   System.out .println(" setAdditio nalInfoOne () - NEXT  RECORD - c urAmt and  curCode ar e: " + cur Amt + " :  " + curCod e);
  505   System.out .println(" setAdditio nalInfoOne () - NEXT  RECORD - p revAmt and  prevCode  are: " + p revAmt + "  : " + pre vCode);
  506   System.out .println(" setAdditio nalInfoOne () - NEXT  RECORD - s Amt and sC ode are: "  + sAmt.to String() +  " : " + s Code.toStr ing());
  507   **/
  508  
  509                                                                                                                                           curAmt  = 0;
  510                                                                                                                                       curCode =  "";
  511  
  512                                                                                                                                       bSameCode  = false;
  513  
  514                                                                                            }      el se {
  515  
  516                                                                                                    / / debug fo r 0 amts.. ...
  517   /**                                                                                              
  518   System.out .println(" setAdditio nalInfoOne () - 0 amt  - current  setting a re: ");
  519   System.out .println(" setAdditio nalInfoOne () - 0 amt  - record  count is:  " + recCou nt);
  520   System.out .println(" setAdditio nalInfoOne () - 0 amt  - curAmt  and curCod e are: " +  curAmt +  " : " + cu rCode);
  521   System.out .println(" setAdditio nalInfoOne () - 0 amt  - prevAmt  and prevC ode are: "  + prevAmt  + " : " +  prevCode) ;
  522   System.out .println(" setAdditio nalInfoOne () - 0 ant  - sAmt an d sCode ar e: " + sAm t.toString () + " : "  + sCode.t oString()) ;
  523   **/
  524  
  525  
  526                                                                                            }      //  end adjAm t > 0 chec k
  527  
  528  
  529                                                                                   }       else { 
  530   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoOne () - ADJUS TMENT AMOU NT IS NULL ");                                                                                            
  531                                                                                   }       // end row  entry nul l check
  532                                                                                   
  533                                                                                   
  534                                                                                   
  535  
  536                                                                          }        else {  // end row  null chec k
  537                                                                                   
  538                                                                                   
  539   // System. out.printl n("ClaimPa ymentBean. setAdditio nalInfoOne () - intia l record r eturned is  null - EV ERTHING IS  SET TO DE FAULT VALU ES");                                                                                 
  540                                                                                   
  541                                                                                   
  542                                                                          }
  543  
  544                                                                       } // end  while
  545  
  546                                                                     // trim
  547                                                                      // ERROR:  String in dex out of  range: -2  - test fo r records  with NO DE TAILS....
  548                                                                       
  549   // TO DO:  7/12 - TES T FOR NULL  VALUES FO R EVERYTHI NG IN THIS  BLOCK.... ..                                                                    
  550                                                                       if(recCo unt > 0) {
  551                                                                           
  552                                                                         try {
  553                                                                                                   
  554                                                                                    if( (s Code.lengt h() > 2) & & (sAmt.le ngth() > 2 ) ) {
  555                                                                                                            sCod e=new Stri ngBuffer(s Code.delet eCharAt(sC ode.length ()-2));
  556                                                                                                            sAmt =new Strin gBuffer(sA mt.deleteC harAt(sAmt .length()- 2));
  557           
  558                                                                                                            // a ssign
  559                                                                                                            this .adjReason CodeOne=sC ode.toStri ng();
  560                                                                                                            this .adjAmtStr ing=sAmt.t oString();
  561                                                                                    }
  562                                                                                    
  563                                                                         } catc h(IndexOut OfBoundsEx ception  i ob) {
  564                                                                                                   //   System.o ut.println ("ClaimPay mentBean.s etAddition alInfoOne( ) ERROR: "  + iob.get Message()) ;
  565                                                                                  //  Syst em.out.pri ntln("Clai mPaymentBe an.setAddi tionalInfo One() clai m index is : " + clai mIndexId);
  566                                                                                    iob.pr intStackTr ace();
  567                                                                                    log.er ror(iob.ge tMessage() , iob);
  568                                                                                           } catch(Ex ception x)  {
  569                                                                                                   //  System.ou t.println( "ClaimPaym entBean.se tAdditiona lInfoOne()  ERROR: "  + x.getMes sage());
  570                                                                                  //  Syst em.out.pri ntln("Clai mPaymentBe an.setAddi tionalInfo One() clai m index is : " + clai mIndexId);
  571                                                                                   x.print StackTrace ();
  572                                                                                   log.err or(x.getMe ssage(), x );
  573                                                                                           }         
  574                                                                                    
  575                                                                                    
  576                                                                                    
  577                                                                      }
  578  
  579   // System. out.printl n("setAddi tionalInfo One() END  - Code Str ing is: "  + this.adj ReasonCode One);
  580   // System. out.printl n("setAddi tionalInfo One() END  - Amount S tring is:  " + this.a djAmtStrin g);
  581  
  582  
  583  
  584                             } catc h(Exceptio n ex) {
  585                              // Sy stem.out.p rintln("Cl aimPayment Bean.setAd ditionalIn foOne() ER ROR: " + e x.getMessa ge());
  586                              // Sy stem.out.p rintln("Cl aimPayment Bean.setAd ditionalIn foOne() cl aim index  is: " + cl aimIndexId );
  587                               ex.p rintStackT race();
  588                               log. error(ex.g etMessage( ), ex);
  589                              }
  590  
  591  
  592       }   //  end setAd ditionalIn foOne()
  593  
  594  
  595       
  596  
  597  
  598           
  599           @O verride
  600           pu blic Strin g getPaidA mountForma tted() {
  601  
  602                             return  this.paid AmountForm atted;
  603           }
  604  
  605           pu blic void  setPaidAmo unt(BigDec imal paidA mount) {
  606                    this .paidAmoun t = paidAm ount;
  607           }
  608  
  609  
  610           pu blic void  setPaidAmo untFormatt ed(String  paidAmount ) {
  611                    this .paidAmoun tFormatted  = paidAmo unt;
  612           }
  613  
  614  
  615           
  616           
  617   //// GETTE RS AND SET TERS 
  618           /* *
  619            *  @return t he lineIte mCount
  620            * /
  621           @O verride
  622           pu blic int g etLineItem Count() {
  623                    retu rn lineIte mCount;
  624           }
  625  
  626  
  627           @O verride
  628           pu blic void  setLineIte mCount(int  lineItemC ount) {
  629                    this .lineItemC ount = lin eItemCount ;
  630           }
  631  
  632           @O verride
  633           pu blic Strin g getCheck Number() {
  634                    retu rn this.ch eckNumber;
  635           }
  636  
  637           @O verride
  638           pu blic void  setCheckNu mber(Strin g checkNum ber) {
  639                    this .checkNumb er = check Number;
  640           }
  641  
  642  
  643  
  644           @O verride
  645           pu blic Strin g getAdjRe asonCodeOn e() {
  646                    retu rn this.ad jReasonCod eOne;
  647           }
  648  
  649  
  650  
  651   // generat ed methods
  652       @Destr oy
  653       public  void dest roy() {
  654       }
  655  
  656       @Remov e
  657       public  void remo ve() {
  658       }
  659  
  660  
  661  
  662  
  663  
  664           //  @Override
  665           pu blic java. sql.Date g etTreasury PaymentDat e() {
  666                    retu rn this.tr easuryPaym entDate;
  667           }
  668  
  669  
  670           @O verride
  671           pu blic Strin g getTreas uryPayment DateFormat ted() {
  672                    retu rn treasur yPaymentDa teFormatte d;
  673           }
  674  
  675  
  676           pu blic void  setTreasur yPaymentDa teFormatte d(String t reasuryPay mentDateFo rmatted) {
  677                    this .treasuryP aymentDate Formatted  = treasury PaymentDat eFormatted ;
  678           }
  679  
  680  
  681           pu blic long  getClaimIn dex() {
  682                    retu rn claimIn dex;
  683           }
  684  
  685  
  686           pu blic void  setClaimIn dex(long c laimIndex)  {
  687                    this .claimInde x = claimI ndex;
  688           }
  689  
  690  
  691           @O verride
  692           pu blic void  setAdjReas onCodeOne( String adj ReasonCode One) {
  693                    this .adjReason CodeOne =  adjReasonC odeOne;
  694           }
  695  
  696  
  697           @O verride
  698           pu blic Strin g getAdjAm tString()  {
  699                    retu rn adjAmtS tring;
  700           }
  701  
  702  
  703           /* *
  704            *  @param ad jAmtString  the adjAm tString to  set
  705            * /
  706           @O verride
  707           pu blic void  setAdjAmtS tring(Stri ng adjAmtS tring) {
  708                    this .adjAmtStr ing = adjA mtString;
  709           }
  710  
  711           @O verride
  712           pu blic java. sql.Timest amp getLin eItemTreas uryPayment Date() {
  713                    retu rn lineIte mTreasuryP aymentDate ;
  714           }
  715  
  716           @O verride
  717           pu blic void  setLineIte mTreasuryP aymentDate (java.sql. Timestamp  lineItemTr easuryPaym entDate) {
  718                    this .lineItemT reasuryPay mentDate =  lineItemT reasuryPay mentDate;
  719           }
  720  
  721           /* *
  722            *  @return t he lineIte mTreasuryP aymentDate Formatted
  723            * /
  724           pu blic Strin g getLineI temTreasur yPaymentDa teFormatte d() {
  725                    
  726  
  727                    Stri ng retVal  = "";
  728                    // S tring temp  = ""; 
  729                             
  730                    // t his is the  value of  a java.sql .Timestamp  created w ith the co nstructor  arg of -1
  731                    // i t is creat ed when th e DB retur ns a null  value 
  732                    Stri ng nullStr ing = "196 9-12-31 17 :59:59.999 ";
  733                    
  734                    // t ry {
  735                    
  736                             /**
  737                              * 3 c ases here:
  738                              * 1.  Valid date
  739                              * 2.  Null value
  740                              * 3.  Value of n ullString  - occurs w hen value  is null fr om DB..... ..go figur e.
  741                              */
  742                             
  743                             
  744                             if(thi s.lineItem TreasuryPa ymentDateF ormatted = = null) {
  745                                      return r etVal;           // r eturn defa ult value
  746                             }
  747                             
  748                             if(thi s.lineItem TreasuryPa ymentDateF ormatted.e quals(null String)) {
  749                                      return r etVal;
  750                             }
  751                             
  752                             return  this.line ItemTreasu ryPaymentD ateFormatt ed;
  753  
  754                    
  755           }        // e nd getLine ItemTreasu ryPaymentD ateFormatt ed()
  756  
  757  
  758           /* *
  759            *  @param li neItemTrea suryPaymen tDateForma tted the l ineItemTre asuryPayme ntDateForm atted to s et
  760            * /
  761           pu blic void  setLineIte mTreasuryP aymentDate Formatted( String lin eItemTreas uryPayment DateFormat ted) {
  762                    this .lineItemT reasuryPay mentDateFo rmatted =  lineItemTr easuryPaym entDateFor matted;
  763           }
  764  
  765  
  766           /* *
  767            *  @return t he lineIte mPaidAmoun tFormatted
  768            * /
  769           @O verride
  770           pu blic Strin g getLineI temPaidAmo untFormatt ed() {
  771                    
  772                    retu rn lineIte mPaidAmoun tFormatted ;
  773           }
  774           
  775  
  776           /* *
  777            *  @param li neItemPaid AmountForm atted the  lineItemPa idAmountFo rmatted to  set
  778            * /
  779           @O verride
  780           pu blic void  setLineIte mPaidAmoun tFormatted (String li neItemPaid AmountForm atted) {
  781                    this .lineItemP aidAmountF ormatted =  lineItemP aidAmountF ormatted;
  782           }
  783           
  784           
  785           
  786           @O verride
  787           pu blic Strin g getLineI temCheckNu mber() {
  788                             return  lineItemC heckNumber ;
  789                    }
  790                    
  791                    
  792           @O verride
  793           pu blic void  setLineIte mCheckNumb er(String  lineItemCh eckNumber)  {
  794                             this.l ineItemChe ckNumber =  lineItemC heckNumber ;
  795           }
  796           
  797           
  798           /* *
  799            *  @param li neItemAdjA mts the li neItemAdjA mts to set
  800            * /
  801           @O verride
  802           pu blic void  setLineIte mAdjAmts(S tring line ItemAdjAmt s) {
  803                    this .lineItemA djAmts = l ineItemAdj Amts;
  804           }
  805           
  806           
  807           /* *
  808            *  @return t he lineIte mAdjAmts
  809            * /
  810           @O verride
  811           pu blic Strin g getLineI temAdjAmts () {
  812                    retu rn lineIte mAdjAmts;
  813           }
  814           
  815           
  816           /* *
  817            *  @return t he lineIte mCodes
  818            * /
  819           @O verride
  820           pu blic Strin g getLineI temCodes()  {
  821                    retu rn lineIte mCodes;
  822           }
  823           
  824  
  825           /* *
  826            *  @param li neItemCode s the line ItemCodes  to set
  827            * /
  828           @O verride
  829           pu blic void  setLineIte mCodes(Str ing lineIt emCodes) {
  830                    this .lineItemC odes = lin eItemCodes ;
  831           }
  832  
  833  
  834           /*  (non-Java doc)
  835            *  @see java .lang.Obje ct#toStrin g()
  836            * /
  837           @O verride
  838           pu blic Strin g toString () {
  839                    retu rn "ClaimP aymentBean  [checkNum ber=" + ch eckNumber
  840                                      + ", adj ReasonCode One=" + ad jReasonCod eOne + ",  adjAmtStri ng="
  841                                      + adjAmt String + " , treasury PaymentDat eFormatted ="
  842                                      + treasu ryPaymentD ateFormatt ed + ", pa idAmountFo rmatted="
  843                                      + paidAm ountFormat ted + ", l ineItemCou nt=" + lin eItemCount
  844                                      + ", tre asuryPayme ntDate=" +  treasuryP aymentDate
  845                                      + ", tre asuryPayme ntAmount="  + treasur yPaymentAm ount
  846                                      + ", adj AmtOne=" +  adjAmtOne  + ", paid Amount=" +  paidAmoun t
  847                                      + ", lin eItemTreas uryPayment Date="
  848                                      + lineIt emTreasury PaymentDat e
  849                                      + ", lin eItemPaidA mountForma tted="
  850                                      + lineIt emPaidAmou ntFormatte d + ", lin eItemCheck Number="
  851                                      + lineIt emCheckNum ber + ", l ineItemAdj Amts=" + l ineItemAdj Amts
  852                                      + ", lin eItemCodes =" + lineI temCodes +  ", claimI ndex="
  853                                      + claimI ndex + "]" ;
  854           }
  855  
  856  
  857           /*  (non-Java doc)
  858            *  @see java .lang.Obje ct#hashCod e()
  859            * /
  860           @O verride
  861           pu blic int h ashCode()  {
  862                    fina l int prim e = 31;
  863                    int  result = 1 ;
  864                    resu lt = prime  * result
  865                                      + ((adjA mtOne == n ull) ? 0 :  adjAmtOne .hashCode( ));
  866                    resu lt = prime  * result
  867                                      + ((adjA mtString = = null) ?  0 : adjAmt String.has hCode());
  868                    resu lt = prime
  869                                      * result
  870                                      + ((adjR easonCodeO ne == null ) ? 0 : ad jReasonCod eOne.hashC ode());
  871                    resu lt = prime  * result
  872                                      + ((chec kNumber ==  null) ? 0  : checkNu mber.hashC ode());
  873                    resu lt = prime  * result  + (int) (c laimIndex  ^ (claimIn dex >>> 32 ));
  874                    resu lt = prime  * result
  875                                      + ((form atter == n ull) ? 0 :  formatter .hashCode( ));
  876                    resu lt = prime  * result
  877                                      + ((line ItemAdjAmt s == null)  ? 0 : lin eItemAdjAm ts.hashCod e());
  878                    resu lt = prime
  879                                      * result
  880                                      + ((line ItemCheckN umber == n ull) ? 0 :  lineItemC heckNumber
  881                                                       .h ashCode()) ;
  882                    resu lt = prime  * result
  883                                      + ((line ItemCodes  == null) ?  0 : lineI temCodes.h ashCode()) ;
  884                    resu lt = prime  * result  + lineItem Count;
  885                    resu lt = prime
  886                                      * result
  887                                      + ((line ItemPaidAm ountFormat ted == nul l) ? 0
  888                                                       :  lineItemPa idAmountFo rmatted.ha shCode());
  889                    resu lt = prime
  890                                      * result
  891                                      + ((line ItemTreasu ryPaymentD ate == nul l) ? 0
  892                                                       :  lineItemTr easuryPaym entDate.ha shCode());
  893                    resu lt = prime  * result
  894                                      + ((paid Amount ==  null) ? 0  : paidAmou nt.hashCod e());
  895                    resu lt = prime
  896                                      * result
  897                                      + ((paid AmountForm atted == n ull) ? 0 :  paidAmoun tFormatted
  898                                                       .h ashCode()) ;
  899                    resu lt = prime
  900                                      * result
  901                                      + ((trea suryPaymen tAmount ==  null) ? 0  : treasur yPaymentAm ount
  902                                                       .h ashCode()) ;
  903                    resu lt = prime
  904                                      * result
  905                                      + ((trea suryPaymen tDate == n ull) ? 0 :  treasuryP aymentDate
  906                                                       .h ashCode()) ;
  907                    resu lt = prime
  908                                      * result
  909                                      + ((trea suryPaymen tDateForma tted == nu ll) ? 0
  910                                                       :  treasuryPa ymentDateF ormatted.h ashCode()) ;
  911                    retu rn result;
  912           }
  913  
  914  
  915           /*  (non-Java doc)
  916            *  @see java .lang.Obje ct#equals( java.lang. Object)
  917            * /
  918           @O verride
  919           pu blic boole an equals( Object obj ) {
  920                    if ( this == ob j)
  921                             return  true;
  922                    if ( obj == nul l)
  923                             return  false;
  924                    if ( !(obj inst anceof Cla imPaymentB ean))
  925                             return  false;
  926                    Clai mPaymentBe an other =  (ClaimPay mentBean)  obj;
  927                    if ( adjAmtOne  == null) {
  928                             if (ot her.adjAmt One != nul l)
  929                                      return f alse;
  930                    } el se if (!ad jAmtOne.eq uals(other .adjAmtOne ))
  931                             return  false;
  932                    if ( adjAmtStri ng == null ) {
  933                             if (ot her.adjAmt String !=  null)
  934                                      return f alse;
  935                    } el se if (!ad jAmtString .equals(ot her.adjAmt String))
  936                             return  false;
  937                    if ( adjReasonC odeOne ==  null) {
  938                             if (ot her.adjRea sonCodeOne  != null)
  939                                      return f alse;
  940                    } el se if (!ad jReasonCod eOne.equal s(other.ad jReasonCod eOne))
  941                             return  false;
  942                    if ( checkNumbe r == null)  {
  943                             if (ot her.checkN umber != n ull)
  944                                      return f alse;
  945                    } el se if (!ch eckNumber. equals(oth er.checkNu mber))
  946                             return  false;
  947                    if ( claimIndex  != other. claimIndex )
  948                             return  false;
  949                    if ( formatter  == null) {
  950                             if (ot her.format ter != nul l)
  951                                      return f alse;
  952                    } el se if (!fo rmatter.eq uals(other .formatter ))
  953                             return  false;
  954                    if ( lineItemAd jAmts == n ull) {
  955                             if (ot her.lineIt emAdjAmts  != null)
  956                                      return f alse;
  957                    } el se if (!li neItemAdjA mts.equals (other.lin eItemAdjAm ts))
  958                             return  false;
  959                    if ( lineItemCh eckNumber  == null) {
  960                             if (ot her.lineIt emCheckNum ber != nul l)
  961                                      return f alse;
  962                    } el se if (!li neItemChec kNumber.eq uals(other .lineItemC heckNumber ))
  963                             return  false;
  964                    if ( lineItemCo des == nul l) {
  965                             if (ot her.lineIt emCodes !=  null)
  966                                      return f alse;
  967                    } el se if (!li neItemCode s.equals(o ther.lineI temCodes))
  968                             return  false;
  969                    if ( lineItemCo unt != oth er.lineIte mCount)
  970                             return  false;
  971                    if ( lineItemPa idAmountFo rmatted ==  null) {
  972                             if (ot her.lineIt emPaidAmou ntFormatte d != null)
  973                                      return f alse;
  974                    } el se if (!li neItemPaid AmountForm atted
  975                                      .equals( other.line ItemPaidAm ountFormat ted))
  976                             return  false;
  977                    if ( lineItemTr easuryPaym entDate ==  null) {
  978                             if (ot her.lineIt emTreasury PaymentDat e != null)
  979                                      return f alse;
  980                    } el se if (!li neItemTrea suryPaymen tDate
  981                                      .equals( other.line ItemTreasu ryPaymentD ate))
  982                             return  false;
  983                    if ( paidAmount  == null)  {
  984                             if (ot her.paidAm ount != nu ll)
  985                                      return f alse;
  986                    } el se if (!pa idAmount.e quals(othe r.paidAmou nt))
  987                             return  false;
  988                    if ( paidAmount Formatted  == null) {
  989                             if (ot her.paidAm ountFormat ted != nul l)
  990                                      return f alse;
  991                    } el se if (!pa idAmountFo rmatted.eq uals(other .paidAmoun tFormatted ))
  992                             return  false;
  993                    if ( treasuryPa ymentAmoun t == null)  {
  994                             if (ot her.treasu ryPaymentA mount != n ull)
  995                                      return f alse;
  996                    } el se if (!tr easuryPaym entAmount. equals(oth er.treasur yPaymentAm ount))
  997                             return  false;
  998                    if ( treasuryPa ymentDate  == null) {
  999                             if (ot her.treasu ryPaymentD ate != nul l)
  1000                                      return f alse;
  1001                    } el se if (!tr easuryPaym entDate.eq uals(other .treasuryP aymentDate ))
  1002                             return  false;
  1003                    if ( treasuryPa ymentDateF ormatted = = null) {
  1004                             if (ot her.treasu ryPaymentD ateFormatt ed != null )
  1005                                      return f alse;
  1006                    } el se if (!tr easuryPaym entDateFor matted
  1007                                      .equals( other.trea suryPaymen tDateForma tted))
  1008                             return  false;
  1009                    retu rn true;
  1010           }
  1011  
  1012  
  1013           @O verride
  1014           pu blic void  setPaidAmo untFormatt ed(BigDeci mal paidAm ount) {
  1015                    // T ODO Auto-g enerated m ethod stub
  1016                    
  1017           }
  1018           
  1019           
  1020           
  1021           
  1022  
  1023   }       //  end Claim PaymentBea n()