• 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

B&S 2.3.2 fields of a record

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a doubt about if the flag of the record is considered as a field of a record or not.
For example, my "read" method:

have to return:
String[0] = record's flag
String[1] = name
String[2] = location
...
or:
String[0] = name
String[1] = location
...
?

So, "fields of a record" means flag+name+location... or name+location... (I think name+location... without the flag).

Thank you.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, Patrick!

Champion, you don't really have to include the record's flag in the String array that will be returned; after all, if you were able to read it, then it is a valid record, otherwise, a RecordNotFoundException should be thrown.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Patrick (and all others),

The JavaRanch has a great search-function, so time to promote it (it really deserves it). If i used to quick search function (besides the "new topic" button) and entered "flag part array record" (without the quotes) I got 2 threads discussing exactly the same question:
  • thread 1
  • thread 2


  • Kind regards,
    Roel
     
    reply
      Bookmark Topic Watch Topic
    • New Topic