Saturday, February 26, 2011

Problem accessing a service that extends a generic superclass

I have a simple service:

public class ArticleService {

   public Article findArticle(Long id) {
   ..
   }
   public void persist(Article artilce) {
   ..
   }
}

I use it with RequestFactory like this:

@Service(value = ArticleService.class, locator = DefaultServiceLocator.class)
public interface ArticleRequestContext extends RequestContext {
..
}

everything works as expected...

then I tried to refactor the service:

public class ArticleService extends BasicService<Article, ArticleDao> {
...
}

wherein I moved methods like persist(), etc to the generic BasicService. Now, requests for persist() do no longer work.

any ideas? is there a problem with generic classes?

thanks in advance,
-g.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment