This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes find method in Data class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "find method in Data class" Watch "find method in Data class" New topic
Author

find method in Data class

Miguel Roque
Ranch Hand

Joined: Oct 24, 2002
Posts: 126
Hello.
I've been working in the reservation part of the assignment and i've seen what could be a bug in the data class. The method find in this class compares the first value using the equals (what is right), but in my case, i've created new records that i've added to the database and some of them in the first field doesn't have 5 digits as in the original database. Like this, the method find doesn't work.
I've changed the line

to be

Has anyone done this? Is it realy necessary? Well, we can allways argue this in the design choices file !
Thanks,
Miguel
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Hi Miguel,
I guess most people (as I have ) would just trim the values on the presentation of the data on the GUI i.e on the View
as well as on any equality checks between the View and the Model.
I think that's right. As far as Internationalisation goes, I should think trailing spaces meaning nothing is pretty Universal.
regards
 
Don't get me started about those stupid light bulbs.
 
subject: find method in Data class
 
Similar Threads
How overrided HashCode() is being called in this method??
B&S: auto-failure worries...
suncertify.db.Data
database unique fields
ROWID next "big" thing.