Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bookseats flow!

 
Vikas Sood
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends '
My bookSeats method has the flight number and no of seats to be booked as parameter.
First of all i use find of Data class to find a record for this flight number.From the record i get hold of record number for the record.
With this record number as a parameter i call lock(int recNum),then getRecord(int recNum)for retriving the record,after that a check for available seats is run from which no. of seats to be booked is subtracted,then unlock(int recNum) is called.
Is this flow appropriate.
VikasSood
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds great to me. you are basically Lock-Read-Modify-Unlock.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic