org.compass.gps.device.hibernate
Interface HibernateQueryProvider

All Known Implementing Classes:
DefaultHibernateQueryProvider

public interface HibernateQueryProvider

During indexing time provides the Hibernate Query to extract the data to be indexed per entity.

Can return either return Query or Criteria. Indexers (HibernateIndexEntitiesIndexer are encouraged to first check the criteria, and if that returns null use the query.

Author:
kimchy

Method Summary
 Criteria createCriteria(Session session, EntityInformation entityInformation)
          Create a Criteria query based on the EntityManager and the EntityInformation.
 Query createQuery(Session session, EntityInformation entityInformation)
          Create a HIbnerate Query based on the Hibernate Session and the EntityInformation.
 

Method Detail

createQuery

Query createQuery(Session session,
                  EntityInformation entityInformation)
Create a HIbnerate Query based on the Hibernate Session and the EntityInformation.

Parameters:
session - The Hibernate session to create the query with
entityInformation - The enity information to create the query with
Returns:
the Hibernate query

createCriteria

Criteria createCriteria(Session session,
                        EntityInformation entityInformation)
Create a Criteria query based on the EntityManager and the EntityInformation. Criteria queries respect customizations about eager fetching of collections.

Parameters:
session - The Hibernate session to create the query with
entityInformation - The enity information to create the query with
Returns:
the Hibernate query


Copyright (c) 2004-2008 The Compass Project.