• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Data Type

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I have a very basic doubt about FBN
All the data is stored as STRINGS
Where should we convert the data into appropriate type
For example we need to convert "Avail Seats" to Integer.
And where should be this mapping.
Is it OK to modify data info class
Thanks
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can parse the avail. seats string to an integer when you need to process it. For ex. while validating a booking request (no of seats required should be less than no of seats available) or while updating the database after reducing the no. of available seats.
For displaying etc. you can simply use it as a string.
You can say that this is a limitation of your database that you can only store strings. You can but you don't need to modify the Data class for this.
-Paul.
------------------
Get Certified, Guaranteed!
www.enthuware.com/jqplus

SCJP2 Resources, WebCompiler, Compare Mock Exam Results and More!
www.jdiscuss.com
Your guide to SCJD exam!
www.enthuware.com/jdevplus
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would not modify DataInfo either.
 
ramandeep singh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx Paul
Yeah I can convert the fields for claculation.
But in that case I have to hardcode the conversion
on client side.
But I think it is okay for this application.
Any Comments?
 
reply
    Bookmark Topic Watch Topic
  • New Topic