Win a copy of Spring Boot in Practice this week in the Spring forum!

Dirk Band

Greenhorn
+ Follow
since Jun 16, 2003
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 Dirk Band

Hello everybody,
My assigment says:
In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.
Should it be possible to start the server and change the location via client GUI?
Or can I hardcode the database location in server mode?
Hi Andrew,
Yes I have. I must have been blind. Yesterday was'nt my day.
Regards,
Dirk
Hello,
I have some problems to understand how to book a record.
My Assignment says (Bodgitt & Scarper):
"It must allow the user to book a selected record, updating the database file accordingly. "
But I have no datafield in the data file to store that booking. I booking like counting down the the staff of the organization?
Thanx for help.
Hi Andrew,
If I have two interface one for network one for local. This causes probably more redundant work at the client side. Means data access via local mode and data access via network mode. Two simular interfaces would be nice.
Regards,
Dirk
Hello,
I have got a question concerning the required interface.
My assignment says:
"Server
Required Interface
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
package suncertify.db;
public interface DBAccess
{
// Reads a record from the file. Returns an array where each
// element is a record value.
public String [] readRecord(long recNo)
throws RecordNotFoundException;
// Modifies the fields of a record. The new value for field n
// appears in data[n]. Throws SecurityException
// if the record is locked with a cookie other than lockCookie.
public void updateRecord(long recNo, String[] data, long lockCookie)
throws RecordNotFoundException, SecurityException;
...................
"
this is clear to me when it comes to local access.
The Question is: Do I have to implement this interface into my RMI DataImpl class as well? If yes. It is not possible to implement this interface and throw any broader exceptions, as required when using RMI.
When using RMI each method must throw and RemoteException.
Is it completely wrong to use RMI in this case?
My main concern is the "must" in the requirement of th assignment.
Any answers?
Hello everybody,
my assignment says:
// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public long[] findByCriteria(String[] criteria);
I understand that criteria[0] is the first database field. In my case it's name.
criteria[1] is second database field (location). and so on.
Example: findByCriteria({"Fred","Dallas","80$","",""})
Am I rigth?
Thanks for this quick answer. I read it.
But my assignment says:
// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public long[] findByCriteria(String[] criteria);
I understand that criteria[0] is the first database field. In my case it's name.
criteria[1] is second database field (location). and so on.
Example: findByCriteria({"Fred","Dallas","80$","",""})
Am I rigth?
Cheers Dirk
Hi,
I have some concerns about the implementation of the �public long[] fingByCriteria(String[] criteria)� method.
The Assignment says:
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
Should it by possible to serach for records where name AND location match and where name OR location match? But then, how to implement this in the findByCriteriaMethod? There is no parameter for the binding AND OR.