Yes, something like this...

        abstract Entity Type 
                { 
                  scaffold 
                
                  String shortKey key; 
                  String description; 
                
                  Repository TypeRepository 
                  { 
                            List<@Type> findAllOf(Class typeClass) => 
AccessObject;
                  } 
                } 
                
                Entity TypeA extends @Type 
                { 
                } 
                
                Entity TypeB extends @Type 
                { 
                } 
                
                Service TypeService 
                { 
                   findAllOf => @TypeRepository.findAllOf;
                }

With FindAllOfAccessImpl:

public class FindAllOfAccessImpl extends FindAllOfAccessImplBase {
    @SuppressWarnings("unchecked")
    @Override
    public void performExecute() {
        StringBuilder queryStr = new StringBuilder();
        queryStr.append("select e from
").append(getTypeClass().getName()).append(" e");
        Query query = getEntityManager().createQuery(queryStr.toString());
        List resultList = query.getResultList();
        setResult(resultList);
    }
}
-- 
View this message in context: 
http://www.nabble.com/model.btdesign-and-Generics-tp24643102s17564p24695579.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to