This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird 1.2.1 recNo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird 1.2.1 recNo" Watch "URLyBird 1.2.1 recNo" New topic
Author

URLyBird 1.2.1 recNo

paolo rico
Greenhorn

Joined: Mar 07, 2004
Posts: 5
Hi all, I just started with the assignment and I have millions of questions!

How do we store the recordId (the position of the offset where the record starts), the interface have the following signature



Should I store recordId in my value object and make it available for the client??

Best
Regrds
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5147
    
  12

paolo rico wrote:Hi all, I just started with the assignment and I have millions of questions!


join the club i have asked a million questions already and still have a million questions: each answer generates another question

that's up to you to decide. you can add the record number to your value object, but i'll not add it there.

my find-method in my business layer will return a Map<Integer, Room> object, where the integer is the record numer, and the room the value-object of the String-array


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
paolo rico
Greenhorn

Joined: Mar 07, 2004
Posts: 5
Hi! Sorry but I’m not sure what you mean, the interface signature is



Does this not means the client should know the recNo or that this mean we map recNo to the real offset position, recNo is in this case only 1,2,3,4,5 and maps to 74, 234, ..

my find-method in my business layer will return a Map<Integer, Room> object, where the integer is the record numer, and the room the value-object of the String-array


How does the client in your solution know about recorNumber is map to correct value object?


Thanks
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5147
    
  12

i don't have a client yet but what i do know is i'm not gonna put the record number in the value-object because in my opinion the record number is not a part of the value-object.

it also depends on what your value-object is: if it is a Room then record number certainly is not a part of it. if the value object is a RoomRecord then you can add the recno to the value-object
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
My record numbers were present in the RoomVacancy, as id's. So I think it's ok to have them there.
In my case, record numbers mapped on the real position of the record in file (0, 1, 2 etc).


SCJP 1.4 100%
SCJD 99.5%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLyBird 1.2.1 recNo
 
Similar Threads
Locking and client identification
Locking with a cookie
Wait in lock method
My locking approach...comments please
UrlyBird 1.3.2 locking with no cookie