File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird 1.2.1 recNo

 
paolo rico
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9127
75
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
paolo rico
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9127
75
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic