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;
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.
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.