• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

delete flag in readRecord

 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment has the readRecord defined as.
// Reads a record from the file. Returns an array where each
// element is a record value.
public String [] readRecord(long recNo)


In the deleteFlag considered a record value. In the GUI I am building the data, and negating the deleted records, to show up.

Now looking at the specs, it appears the data is defined as

The database that URLyBird uses contains the following fields:

Hotel Name name (64) : The name of the hotel this vacancy record relates to City
location (64) : The location of this hotel
etc. etc.

It doesnt mention deleteFlag as being a part.


Can this be assumed ?
 
Ed Tse
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like the database header, and the database schema, this deleteflag should be hidden from the business logic. When read() is called, the deleteflag should not be treated as a column when returning the string array. It is an internal db implementation such that when a record is deleted, it can be reuse when create is called.
[ February 27, 2006: Message edited by: Ed Tse ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic