Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

URLyBird 1.2.1 recNo

 
Greenhorn
Posts: 5
  • 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
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • 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
 
Ranch Hand
Posts: 158
  • 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).
 
Whatever you say buddy! And I believe this tiny ad too:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic