aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX:deleted flag as a field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX:deleted flag as a field" Watch "NX:deleted flag as a field" New topic
Author

NX:deleted flag as a field

ryan huang
Greenhorn

Joined: Jun 30, 2003
Posts: 2
In the urlybird data file,there is a two-byted flag which shows whether a record is deleted(0x0080 stands for being deleted) .
So,i want to treat this flag as a field
like "name","location"...
please tell me is this acceptable?
THX!
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Well, it's like a field, but it has special properties. When you do a read(recNo) and return a String[] containing the field values, I don't think you should return the deleted flag as one of those fields. For one thing, the instructions never call it a "field", and never really imply it should be treated the same as the others. For another, there's no point really in returning its value, because if you're returning any values, the deleted flag must be false. Because if deleted were true, you're required to throw RecordNotFoundException rather than return. Users should never be able to see a deleted record anyway - the only records displayed are those where the deleted flag is false. So the user doesn't need to actually see the deleted flag - it's useless. Does that make sense?


"I'm not back." - Bill Harding, Twister
ryan huang
Greenhorn

Joined: Jun 30, 2003
Posts: 2
thank you jim
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX:deleted flag as a field