commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "José Fortunato H. Tomás" <jto...@mediacapital.pt>
Subject Re: Commons-dbutils: Setter for Oracle DB Table of type NUMBER isn't called
Date Thu, 27 Nov 2003 16:37:29 GMT
Just fo help I'm adding the following inspection by SQL:

Oracle Sql Query:
    desc Customer result;

Output:

 Nome                                                                    
                                                                        
                                                                        
                                                                        
                     Nulo?      Tipo
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------- 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 CUSTOMER_ID                                                            
                                                                        
                                                                        
                                                                        
                         NOT NULL NUMBER(8)
 CUSTOMER_NAME                                                        
                                                                        
                                                                        
                                                                        
                                  VARCHAR2(120)
 BILL_CYCLE                                                            
                                                                        
                                                                        
                                                                        
                              VARCHAR2(2)
 CUSTOMER_TYPE                                                        
                                                                        
                                                                        
                                                                        
                                  NUMBER
 STATUS                                                                 
                                                                        
                                                                        
                                                                        
                          VARCHAR2(1)
 GTP_FLAG                                                                
                                                                        
                                                                        
                                                                        
                          VARCHAR2(1)
 CREATE_DATE                                                            
                                                                        
                                                                        
                                                                        
                              DATE
 CREATED_BY                                                            
                                                                        
                                                                        
                                                                        
                              VARCHAR2(32)
 MODIFICATION_DATE                                                    
                                                                        
                                                                        
                                                                        
                                  DATE
 MODIFIED_BY                                                            
                                                                        
                                                                        
                                                                        
                              VARCHAR2(32)


José Fortunato H. Tomás wrote:

> I have the following problem:
>    Bean setter for an Oracle DB table's collumn of type NUMBER isn't 
> called.
>
> To parcially solve I had to use to_char SQL directive:
> --->
>            QueryRunner run = new QueryRunner( 
> GcfServiceLocator.getInstance().getDataSourceForGCF() );
>            BeanListHandler bh = new BeanListHandler( 
> CustomerValueObject.class );
>            Object[] args = {( "%" + name + "%" ).replaceAll( "\\s", 
> "%" ).replaceAll( "%{2,}", "%" )};
>            query = "select" +
>                    " to_char(CUSTOMER_ID) customerId" +
>                    ", CUSTOMER_NAME name" +
>                    ", BILL_CYCLE billCycle" +
>                    ", to_char(CUSTOMER_TYPE) customerType" +
>                    ", STATUS state" +
>                    ", GTP_FLAG gtpFlag" +
>                    ", CREATE_DATE createDate" +
>                    ", CREATED_BY createdBy" +
>                    ", MODIFICATION_DATE modificationDate" +
>                    ", MODIFIED_BY modifiedBy" +
>                    " from CUSTOMER" +
>                    " where" +
>                    " CUSTOMER_NAME LIKE ?1"
>                    ;
>            logger.debug( "getCustomerListByName(" + query + ")" );
>            ret = (ArrayList)run.query(
>                    query
>                    , args
>                    , bh
>            );
> <---
>
> I looked into the source, but for lack of time I could't found the 
> correct place that maps props types and collunms between setters for 
> lookup method by reflection.
>
> Is there a known issue ? What can I do?
> Is there any code that I can aplly?
> Or can you give-me an indication into the source so I contribute fastly?
>
> Thanks!


-- 

__________________________________________________

José Fortunato Tomás

*Mediacapital** Telecomunicações - IOL*

Rua Mário Castelhano nº 40

2749-502 BARCARENA

 

Ext.: 12733

Telef.:  21 434 59 33

Fax.: 21 434 63 88

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message