Leah Knowles

Greenhorn
+ Follow
since Sep 25, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leah Knowles

Thanks for the advice Roel and Roberto

I have supplied implementations for both create and delete and will test them out. One other thing I had doubts about was the update method. The interface reads

public void update(int recNo, String [] data)

But I have only implemented an update of owner field - to update customerID upon a booking.

Do you think that is enough or should supply update implementation for all fields even though the GUI does not support update them?

Thanks again
Leah

Hi

I have been looking at Roberto's Data class locking program and notice it includes tests of create and delete as well as update and read when checking for deadlock etc.

In my assigment URLyBIRD and most peoples it seems we are only required to supply find and booking functionality to the user. Although I did include an implemenetaion for create and delete it is not actuallly used by the GUI at all.

So I am wondering would the assignment assessors test our create and delete implementation when assessing out locking.

Anyone got some opinions about this?

Thanks
Leah
Hi Roel

Yes noticed you are here a lot which is great for us "learners".

I thinking I'm slowly getting it. So would it be accurate to say that the Business Service implementation is referencing Data class via composition?

Also are you using some connector class to pass a reference of your business Service Implementation back to the GUI? Sorry if asking you divulge too much detail about your implementation.

Leah
I am working on RMI now and having this familiar problem with how to handle RemoteException. As it is not thrown the supplied Sun interface DBMain I cannot throw it in my RMI Data Implementation class.

I found this old thread and saw Roel's and others suggestions to have 2 interfaces BusinessService and BusinessServiceRemote each of which are implemented by differemt classes one for local and one for remote.

What I cant wrap my head around is exactly where these Business services fit in with the Sun interface DBMain and required implementation Data.java? I currently have Data class implementing my own interface ExtendedDbMain which extends DBMain and my Connector class returns a data object.

If Roel or someone with similar solution or implementation has some advice to point me in the right direction on this would be appreciated

Leah
Thank you all for your replies, you were so quick

It is clear to me now

Leah
I am confused about my project specifications and how to handle DuplicateKeyException. It is an exception thrown in the interface Sun supplied, as well as RecordNotFoundException.

Example

public int create(String [] data) throws DuplicateKeyException

The instructions read "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package.

I know I have to create a class for RecordNotFoundException but not sure if I also have to create a class for DuplicateKeyException as well. I suppose my confusion is because java does support an exception named DuplicateKeyException, but if I dont create a class in my project it wont complile.

Thanks in advance for any advice




Hi

I'm sorry if this seems a basic or silly question but I am getting a real mental blank about it. For URLyBird I am working on GUI start up I want to get all Rooms from the data file to populate in the GUI table.

There is a find(String [] criteria) method which if the array parameter is null should return all records, but problem is it only returns the int recNos. I need to get the entire details of all the records niot just the recNo.

I suppose I could create a new method similar to find that returns String [] array or even a Room object but is there a problem with this, as my understanding is we should only use the methods in the Data.java interface supplied in the assignment and not introduce new ones. I dont want to maintain maps or data in the GUI package as I believe this is not good practice.

How did others do this?

Thanks
Leah
For URLyBird a recNo is needed to read and update records.

At first I thought the customer ID (owner field) could be used for this but realize all entries to start with have a blank customer ID so this would not make sense.

Do most of you just allocate a number for recNo, for example the first record make it 1, then 2, 3 etc and use this as the key in your map to link to database location? Or any other ideas for what to use for recNo?

Thanks for any advice
Leah