> Von: Pavel Tavoda [mailto:[email protected]]
>
> >From you explanation it looks like clear inheritance. Make BaseType
> and than inherit all Types from it. Implementation should be placed
> only to BaseType.
This is, what I have done so far. I'm fine with the entity declaration.
My problem occurs when it comes to the service.
I'd like to specify like this:
abstract Entity Type
{
scaffold
String shortKey key;
String description;
Repository TypeRepository
{
}
}
Entity TypeA extends @Type
{
}
Entity TypeB extends @Type
{
}
Service TypeService
{
>@TypeRepository
<T extends Type> T add(T t);
<T extends Type> T save(T t);
<T extends Type> T remove(T t);
<T extends Type> Collection<T> findAll(Class<T> clazz);
<T extends Type> T findByKey(Class<T> clazz, String key);
}
So that I can call the service:
- typeService.findAll(TypeB.class);
- typeService.findByKey(TypeA.class, "ABC");
Regards,
Sascha Broich
--
TSA - Teleport Sachsen-Anhalt Service GmbH
Delitzscher Straße 70, 06112 Halle
Phone: +49 39203 8 2524
Email: [email protected]
Firmensitz: Steinfeldstraße 5, D-39179 Barleben
Geschäftsführer: Marco Langhof
Amtsgericht: Stendal HRB 6388
http://www.tsa.de
------------------------------------------------------------------------------
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer