Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Type

 
ramandeep singh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • 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
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not modify DataInfo either.
 
ramandeep singh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic