• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

urly bird

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ..
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic