• 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

UserDAO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The UserDAO interface'll be changed to extend the HibernateGenericDAO?
[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean?

It makes no sense to extend a class from an interface. I guess Rafael should write something about his ideas with the new model. I guess the idea is to make all the DAO's in net/jjforum/dao into interfaces, and the create the implementations of them inside net/jforum/dao/hibernate. But I haven't looked at it proberly yet.
[originally posted on jforum.net by lazee]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was looking others DAO's and some of then, like ForumDAO, were extending HibernateGenericDAO, and this class should be similar to UserDAO, shouldn't?

[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While we don't decide, I have modfied the UserDAO to be class that extends HibernateGenericDAO<User>, and working on migrating it.


[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JForum 3 does not have any DAO interface. Everything should be changed to a class, extending HibernateGenericDAO.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, i've finished the migration of UserDAO, and make all the tests, but i1m not good with tests, if someone wants, watches my tests and send/post others.
[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For sure.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another question, there is a method which adds a user with a Id, in hibernate it'll work only if in Entity we remove the Annotation GeneratedValue or if already has one user with Id

What can i do?
[originally posted on jforum.net by Guilherme Moreira]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good point.

This "addUserWithId()" method exists for integration with legacy systems, usually related to SSO (Single Sign On).

You don't have to implement it for now - just throw UnsupportedOperationException.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
reply
    Bookmark Topic Watch Topic
  • New Topic