Package com.ponysdk.hibernate.query

Examples of com.ponysdk.hibernate.query.OrderingCriteria


            for (final Entry<String, CriteriaDecorator> entry : decoratorsByPojoPropertyName.entrySet()) {
                queryGenerator.putDecorator(entry.getKey(), entry.getValue());
            }
        }

        final OrderingCriteria criteria = queryGenerator.generate(query);

        for (final Criterion criterion : criterions) {
            criteria.add(criterion);
        }

        final int count = criteria.count();

        if (!QueryMode.FULL_RESULT.equals(query.getQueryMode())) {
            criteria.setMaxResults(query.getPageSize()).setFirstResult(query.getPageNum() * query.getPageSize());
        }

        final Result<List<T>> result = new Result<List<T>>();
        result.setData(criteria.list());
        result.setFullSize(count);
        return result;
    }
View Full Code Here

TOP

Related Classes of com.ponysdk.hibernate.query.OrderingCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.