• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

design pattern DAO

 
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Carey,
 I do not know how to thank you. Thank you for your help online,
have arrived at the end of this part of my classrooms site, like youtube with the vocal translation that I will implement later ..

Last error getConnection, we created a static method but it is not recognized by eclipse.






again for add.video i have do like this, tell me if it's a mistacke?



King regards Carey
Philippe
 
Saloon Keeper
Posts: 10781
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carey Brown wrote:An add() method is "usually" used to add an instance to a collection. Your collection is a List<Video> whose name is "videos" with a lower case "v". So to add your new "video" instance to your "videos" list you need
(Haven't we been here before?)

The add() method is a method in List. You do not want to create your own add() method.
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
after a discussion with a JEE engineer / eclipse french, the latter tells me this:


It certainly would be if you called it, but in VideoDaoImpl you call getConnection (), which does not have the same signature, so it's not the same method.

In fact, the error is in DaoFactory: the getConnection method should not have arguments but use the attributes of the class (values passed to the constructor).

It would be nice to think of a pool of connections as well.


It seems clear to me that the method does not have the same signature!
but past the parameters in the constructor; I do not understand at all !
The connection pool is worse I do not see the code it should apply
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations Philippe Ponceblanc,

Your question has made it to our Journal.

Have a Cow!
 
Goodbye moon men. Hello tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic