Code example for Session

Methods: createQuery

     * Creates a query based on the select statement initlaized in the query provider 
     * construction. 
    public Query createQuery(Session session, EntityInformation entityInformation) {
        if (selectQuery != null) {
            return session.createQuery(selectQuery);
        return session.createQuery("from " + entityInformation.getName());
     * Creates the Hibernate criteria for the given entity information. Returns 
     * <code>null</code> if the select query is set. 
    public Criteria createCriteria(Session session, EntityInformation entityInformation) {
        if (!isUsingDefaultSelectQuery) {
            return null; 
    	return session.createCriteria(entityInformation.getName());
Connect your IDE to all the code out there  Get Codota for Java