aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can I display the record No. in the client GUI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can I display the record No. in the client GUI?" Watch "Can I display the record No. in the client GUI?" New topic
Author

Can I display the record No. in the client GUI?

long lingyu
Ranch Hand

Joined: Feb 15, 2004
Posts: 51
Can I display the record No. in the client GUI? or I should hide the column.
Satish Avadhanam
Ranch Hand

Joined: Aug 12, 2003
Posts: 697
Originally posted by long lingyu:
Can I display the record No. in the client GUI? or I should hide the column.

Hi long, its upto you. You can hide the details from the CSR and just show him actual data or else you can show record number. The second case can be used if you want to allow the CSR to book using record number.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
In case you want to show your record ID, you may have to handle (or not to handle) the numbering.
For example, if the database contains 3 records, and 1 is mark deleted, the GUI shows only 2 records. But, which of the following you want to have:
option 1:

option 2:

If you choose option 1, it is easier to implement, although the record number is not in sequence.
If you choose option 2, it looks better than option 1, but you may need extra afford to re-order the record number.
Thus, I simply not to show the record number, as in fact, the CSR does not need to know this info.
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
long lingyu
Ranch Hand

Joined: Feb 15, 2004
Posts: 51
When I book a record, I want to find the record through recNo, if I haven't get the record number,should I find the record through the field first? I think showing the number in JTable is more easier to handle. But the requirement?
George Marinkovich
Ranch Hand

Joined: Apr 15, 2003
Posts: 619
Hi Long,
Originally posted by long lingyu:
When I book a record, I want to find the record through recNo, if I haven't get the record number,should I find the record through the field first? I think showing the number in JTable is more easier to handle. But the requirement?

The assignment instructions are silent on whether you can show record numbers in the JTable. Since it isn't prohibited by any requirement I think you are free to do so. The record number does have a meaning (it's the records's physical order in the database file) so I would strongly recommend Nick's option 1 if you decide to show the record numbers in the JTable. Option 2 doesn't make any sense to me and it seems to violate the inherent meaning of the record number. I displayed record numbers to the user in the JTable, so I was able to get the record number for a record from the JTable.


Regards, George
SCJP, SCJD, SCWCD, SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I display the record No. in the client GUI?
 
Similar Threads
Data Locking with a DB File.
NX:Locking - one data instance or multiple
Size of the arraylist different after deleting the record?
NX: Record num in TableModel
Help on this locking scenario