• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Do you show the Flag field and what is really meant by it?

 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my assignment (B&S 2.1.3) says about the flag field in the data file format description:

1 byte flag. 00 implies valid record, 0xFF implies deleted record


I have some questions regarding the flag field

  • Do you show the flag field in your view?
  • How does your flag field looks after you book?
  • Are there other values than 00 and 0xFF allowed?
  • Do we expect that the customer set only 00 and 0xFF in his provided data file?


  • Answers are very welcome

    Regards,
    Darya
    [ April 15, 2005: Message edited by: Darya Akbari ]
     
    Ta Ri Ki Sun
    Ranch Hand
    Posts: 442
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I don't have the same assignment but this should apply, better double check though.

    1) No, on the grounds that any record marked as deleted will not be read, so everything in the view has not been marked as deleted.
    2) Unaffected
    3) No
    4) The user has no access to that value.
    [ April 15, 2005: Message edited by: Ta Ri Ki Sun ]
     
    Darya Akbari
    Ranch Hand
    Posts: 1855
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Ta Ri,

    Sounds good.

    Regards,
    Darya
     
    Darya Akbari
    Ranch Hand
    Posts: 1855
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    But aren't we supposed to implement the delete method public void delete(int recNo, long lockCookie)

    In that case we need to access the data file to update the flag and to make the model persistant. And yes, I mean a physical write to our given data file.

    We can implement the delete method and its flag setting, however we don't have a use case Delete Records in our assignment. So maybe we can also provide a dummy implementation of delete.

    Regards,
    Darya
    [ April 16, 2005: Message edited by: Darya Akbari ]
     
    Frans Janssen
    Ranch Hand
    Posts: 357
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Darya Akbari:
    We can implement the delete method and its flag setting, however we don't have a use case Delete Records in our assignment. So maybe we can also provide a dummy implementation of delete.


    Hi Darya,

    I think that is a risky route to take. You are required to implement the interface and it could be argued that a dummy implementation is not an implementation. Leaving out delete avoids some of the potential concurrency problems, so it could be perceived by the assessor as taking a shortcut.

    If you do make a dummy implementation, document your choice in choices.txt thoroughly.

    In case you decide to implement delete after all, you indeed need to update the file to change the flag.
    The remarks made above are correct: you don't show the deleted flag anywhere in your GUI: you only show records that are not deleted.

    Frans.
     
    Darya Akbari
    Ranch Hand
    Posts: 1855
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Frans,

    it's always good to hear from you . Ok, for the the sake of concurrency and the fact that one may to add a delete record to the view I will implement the delete function.

    Thanks,
    Darya
     
    Frans Janssen
    Ranch Hand
    Posts: 357
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Darya Akbari:
    Ok, for the the sake of concurrency and the fact that one may to add a delete record to the view I will implement the delete function.


    A wise decision!
     
    Darya Akbari
    Ranch Hand
    Posts: 1855
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    That's why I'm here, to collect wisdom
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic