Add some common interfaces

Bug #839353 reported by John Cook
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

Could you create a common interface for all the *QueryFactory implementations? Something like proposed in http://source.mysema.com/forum/mvnforum/viewthread_thread,2973.
It could make switching for example from HibernateQueryFactory to JPAQueryFactory smoother for people using dependency injection.

Also, what about adding method getMetadata() to Query interface? All top-level Query implementations have this method, and for SubQuery implementations, it could be implemented if there is no reason to keep it hidden.

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Fix commited :

/**
 * Common interface for QueryFactory implementations
 *
 * @author tiwe
 *
 * @param <Q>
 * @param <SQ>
 */
public interface QueryFactory<Q extends Query<?>, SQ extends Detachable> {
    /**
     * Create a new Query
     *
     * @return
     */
    Q query();

    /**
     * Create a new Sub query
     *
     * @return
     */
    SQ subQuery();
}

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.2

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.