aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes UB bookRoom/createRow/deleteRow methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "UB bookRoom/createRow/deleteRow methods" Watch "UB bookRoom/createRow/deleteRow methods" New topic
Author

UB bookRoom/createRow/deleteRow methods

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2674
    
    9

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.


K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UB bookRoom/createRow/deleteRow methods