• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Converting Strings fields to base type when using a VO

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using a VO to exchange information from the server (business layer) and the client over network.

But, in the server, when I need to create a array list of the VOs, I am converting the database strings for each field in its base type to store in VO. And, when converting the rate string (currency) to a Float wrapper type, I need to care about localization, because in the database, the rates are stored as "$450.80" for example, and this are the US currency format.

My Vo has this variable:



But I don't know what to do at this point... Someone have a solution?

Other way I thought is just don't convert the database strings to its base types, and my VO could have strings as fields too. Maybe this be the way...

I would appreciate some comments.

Thanks,
Marcelo.
 
Marcelo Camargo
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I took the folowing solution: I create the VO using strings as the fields, because this way I dont need to check for the field integrity.
My would be creating an aditional problem to me doing that.

So, now its more simple and easy to understand.

Marcelo.
 
reply
    Bookmark Topic Watch Topic
  • New Topic