This page (revision-12) was last changed on 18-Aug-2014 15:03 by Dieter Käppel

This page was created on 13-Dec-2010 16:31 by Dieter Käppel

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
12 18-Aug-2014 15:03 7 KB Dieter Käppel to previous
11 18-Aug-2014 15:03 5 KB Dieter Käppel to previous | to last
10 04-Jul-2014 13:19 4 KB Dieter Käppel to previous | to last
9 29-Dec-2012 13:07 3 KB Dieter Käppel to previous | to last
8 30-Nov-2012 13:40 5 KB Dieter Käppel to previous | to last
7 24-Nov-2012 11:54 5 KB Dieter Käppel to previous | to last
6 23-Nov-2012 21:02 4 KB Dieter Käppel to previous | to last
5 23-Nov-2012 08:12 4 KB Dieter Käppel to previous | to last
4 01-Nov-2012 23:48 3 KB Dieter Käppel to previous | to last
3 15-Dec-2010 13:23 1 KB Dieter Käppel to previous | to last
2 15-Dec-2010 11:00 1 KB Dieter Käppel to previous | to last
1 13-Dec-2010 16:31 300 bytes Dieter Käppel to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 96 added 16 lines
!!!Criteria Query
In Hibernate sind die Criteria Querys eine der mächstigsten Instrumente, da sie rein durch ein Programm erzeugt werden können.
{{{
Criteria criteria = ((Session)entityManager.getDelegate()).createCriteria(Rule.class);
ProjectionList projections = Projections.projectionList();
projections.add(Projections.alias(Projections.groupProperty(selector.property()), "goal"));
projections.add(Projections.alias(Projections.rowCount(), "count"));
criteria.setProjection(projections);
criteria.add(Restrictions.like(selector.property(), text, MatchMode.ANYWHERE));
criteria.addOrder(Order.desc("count"));
criteria.setMaxResults(5);
criteria.setResultTransformer(Transformers.aliasToBean(Suggestion.class));
return criteria.list();
}}}