• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urly bird

 
subu ananthram
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondering if I have to implement an equals method for the urly bird

public boolean equals

I dont have a id key here do you reckon I create a id to identify the records or use a composite key ..
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Subu,

Where would you create this method? What are you trying to compare?

Regards, Andrew
 
subu ananthram
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew

I am trying to have a value object called hotel or what ever and have the equals method in it...But on second thoughts if I have a value object like that I am tying my design to accept the object inthis fashion which is a bad idea in case this db changes......
Trying to do something to the DVD class in Denny's DVD
Also on closer inspection of parsing my db I notice that the smoking option is blank when I print the price though it comes as Y/Nand the price
though if I put the field length to be 2 instead of 1 it parses fine.....
and I see a 'Y' or 'N'
Thanks
Subu
 
Ian Hamilton
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you taken into account that each record is preceded by the 1 byte deleted tag?

I had a similar problem whereby I was reading the deleted flag in the wrong place causing my data to be offset by one.

When I fixed this it parsed fine.
 
Richard Khoo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most important thing is that there is a Database Scheme given in the db file. If you read the schema and make use of the information, you will be able to get the data correctly.
 
Richard Khoo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most important thing is that there is a Database Scheme given in the db file. If you read the schema and make use of the information, you will be able to get the data correctly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic