• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deleted flag for Contractor object

 
mohini lalwani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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 ...
 
satishkumar janakiraman
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • 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
 
Pete Palmer
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • 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
 
Alain Dickson
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic