• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

deleted flag for Contractor object

 
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 ...
 
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
 
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
 
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
 
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic