wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes [B&S]UI does not require some methods in DB ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "[B&S]UI does not require some methods in DB ?" Watch "[B&S]UI does not require some methods in DB ?" New topic
Author

[B&S]UI does not require some methods in DB ?

K Huang
Ranch Hand

Joined: Dec 12, 2002
Posts: 55
I am working on 2.1.3

UI requirements include:
*It must allow the user to search the data for all records
*It must allow the user to book a selected record, updating the database file accordingly
...
did not say 'create', 'modify' and 'delete' the contractors. But the DB interface which is required to implement has these methods:
public void delete(int recNo, long lockCookie)
public void update(int recNo, String[] data, long lockCookie)
public int create(String[] data) throws DuplicateKeyException;

a thread discuss this before

I think the update method is for update contractor, not for booking. I can use it for booking though. Then I only need to implement 'update' method, which is the only method need lock. Isn't it too simple for this project ?


The description for the "Customer holding this record" field says "The system you are writing does not interact with these numbers". So I do not need to search by this field, then how can I unbook a record without checking who booked this record first ?



Any idea ?
Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
Originally posted by K Huang:
I am working on 2.1.3

UI requirements include:
*It must allow the user to search the data for all records
*It must allow the user to book a selected record, updating the database file accordingly
...
did not say 'create', 'modify' and 'delete' the contractors. But the DB interface which is required to implement has these methods:
public void delete(int recNo, long lockCookie)
public void update(int recNo, String[] data, long lockCookie)
public int create(String[] data) throws DuplicateKeyException;

a thread discuss this before

I think the update method is for update contractor, not for booking. I can use it for booking though. Then I only need to implement 'update' method, which is the only method need lock. Isn't it too simple for this project ?


The description for the "Customer holding this record" field says "The system you are writing does not interact with these numbers". So I do not need to search by this field, then how can I unbook a record without checking who booked this record first ?

Any idea ?


Even though the client will not be using create, delete, etc. we are still required to fully implement the entire interface for future use with the software. Unbook is not required for this assignment. I don't think you would get any extra points for implementing it. So even though you might be using book and update, implement the entire interface.


SCJP 1.4<br />SCJD 1.4
K Huang
Ranch Hand

Joined: Dec 12, 2002
Posts: 55
Thanks for reply !

If no unbook and no create in UI, then after about 33 books (my database has about 33 records, the database is fully booked and cannot be used any more. What kind of system is this ?
Ellen Zhao
Ranch Hand

Joined: Sep 17, 2002
Posts: 581
Originally posted by K Huang:
...then how can I unbook a record without checking who booked this record first ?



Any idea ?


My solution was: keep a record number for every record, then you can unbook a certain contractor by its record number.
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by K Huang:
Thanks for reply !

If no unbook and no create in UI, then after about 33 books (my database has about 33 records, the database is fully booked and cannot be used any more. What kind of system is this ?


My solution to this is that I have a "pkw.test" package that adds a lot of extra functionality that isn't in the "suncertify.*" packages. One of the programs in my test suite is a maintenance program that allows create, delete, update and unbook actions as well as things like pausing after locking a record. This lets me test all the possible actions and use them when a normal client is trying to search and book records.

Since it's in a different package collection, it doesn't get built by my ANT script into the runme.jar, but goes instead into a test.jar file that contains it and a bunch of other test programs, such as a lock tester that runs many threads against the locking code.

All of this is useful if you want to get "coverage" testing. I use Emma for coverage testing since I don't use any of the heavy IDE's, but this sort of stuff is needed for any form of coverage testing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [B&S]UI does not require some methods in DB ?