class AbstractQueryTranslator implements QueryTranslator<Q,O,P> {

    @SuppressWarnings("unchecked")
    protected <T> Q[] subqueries(Junction j, Class<T> entityClass) {
        List<Criterion> criteria = j.getCriteria();
        List<Q> translated = new ArrayList<Q>(criteria.size());
        for (Criterion c : criteria) {
            Q q = translate(c, entityClass);
            if (q != null) {
                translated.add(q);
            }
        }
        return translated.toArray((Q[]) Array.newInstance(queryClass,
                translated.size()));
    }

    public  AbstractQueryTranslator(Class<Q> queryClass,
            Class<O> orderClass,
            PropertyResolver propertyResolver);

}