• 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

deleted flag for Contractor object

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
should I keep deleted flag inside my Contractor object .
What is meaning of
[B]"1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record "[/B.It is written in Data Section of Data File Format in Sun Instruction

I define these fields in Contractor Object .

private int recordNumber;
private String subcontractorName = "";
private String city = "";
private String typesOfWorkPerformed = "";
private int numberOfStaffInOrganization;
private int hourlyRate;
private long cutomerId;

does my contractor object has enough field ??

where to define deleted flag ?


Please give your inputs ...
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am also working on B&S 2.2.3 and not started the coding. look at this link Delete Flag

sat
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am starting on the B&S 2.2.2 which also has a deleted flag. In my opinion, this flag really comes into play when a record has to be created. I have a requirement, and probably you as well, to possibly reuse deleted record when creating a new record. I don't see the point of having the deleted flag in the Contractor object.

Incidently, I have posted a few questions on the createMethod() a couple days ago, which if you can, I would be grateful for an opinion.

Pete
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi pkarnani,
The database schema in assignment requirements has not defined anything like recordnumber.
For the sake of record number you have to rely on offset of bytes on which the record is lying in the file.
And where you have defined recordNumber you can define the delete flag there in the begning of the record as a short.

Though I am still in the analysis and design mode: btw why do you need a contractor object.

Alain
SCJA, SCJP6
 
reply
    Bookmark Topic Watch Topic
  • New Topic