Topic
  • 2 replies
  • Latest Post - ‏2012-07-20T11:54:09Z by SystemAdmin
SystemAdmin
SystemAdmin
783 Posts

Pinned topic [Ljava.lang.Object; incompatible with ma.eai.batch.ovo.util.Compte

‏2012-07-19T14:49:19Z |
hi.
i'm using JPAReaderPattern

my query retrieve 2 column from my table(9column)

public String getInitialLookupQuery() {

return "select distinct op.numCompte,op.codePops" +
" from TOperation op" +
" where op.TParamStatutOperation.codeStatut='"StatusOvo.ATRAITER"'";
}
public Object fetchRecord(Iterator listIt) {
Compte C= listIt.next();
curAccontId = C.getNumCompte() ;
return C;
}
can u please help me on that
email:s.daouiji@gmail.com
Updated on 2012-07-20T11:54:09Z at 2012-07-20T11:54:09Z by SystemAdmin
  • sspavan
    sspavan
    60 Posts

    Re: [Ljava.lang.Object; incompatible with ma.eai.batch.ovo.util.Compte

    ‏2012-07-19T17:29:57Z  
    You need to type cast the object to Compte while retreiving from the iterator
  • SystemAdmin
    SystemAdmin
    783 Posts

    Re: [Ljava.lang.Object; incompatible with ma.eai.batch.ovo.util.Compte

    ‏2012-07-20T11:54:09Z  
    • sspavan
    • ‏2012-07-19T17:29:57Z
    You need to type cast the object to Compte while retreiving from the iterator
    tkx i resolve it

    public Object fetchRecord(Iterator listIt) {
    Compte C = new Compte();
    Object] cRecord = (Object[) listIt.next() ;
    String numC= cRecord[0].toString();
    String codeP= cRecord[1].toString();

    C= new Compte(numC, codeP);

    curAccontId = C.getNumCompte() ;
    return C;
    }

    email:s.daouiji@gmail.com