• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UB bookRoom/createRow/deleteRow methods

K. Tsang
Posts: 3548
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I have a concern about where I should really put the bookRoom, createRow, deleteRow methods. I have read many people put these methods in their Data class but I currently have these methods in my table model class. Is that ok??

Since my table model interacts with the Data class eg for bookRoom method:
1. lock(recNum)
2. update(strAry)
3. unlock(recNum)
4. do stuff to refresh the table view by calling fireXXXX

Or should I ensure these methods must be called by implementing an interface eg
public MyHotelTable extends AbstractTableModel implement XXInterface

where XXInterface defines the bookRoom, createRow etc methods.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic