1 package org.hibernate.hql; 3 4 import org.hibernate.HibernateException; 5 import org.hibernate.MappingException; 6 import org.hibernate.QueryException; 7 import org.hibernate.ScrollableResults; 8 import org.hibernate.engine.QueryParameters; 9 import org.hibernate.engine.SessionImplementor; 10 import org.hibernate.event.EventSource; 11 import org.hibernate.type.Type; 12 13 import java.util.Iterator ; 14 import java.util.List ; 15 import java.util.Map ; 16 import java.util.Set ; 17 18 23 public interface QueryTranslator { 24 26 String ERROR_CANNOT_FETCH_WITH_ITERATE = "fetch may not be used with scroll() or iterate()"; 27 String ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR = "Named parameter does not appear in Query: "; 28 String ERROR_CANNOT_DETERMINE_TYPE = "Could not determine type of: "; 29 String ERROR_CANNOT_FORMAT_LITERAL = "Could not format constant value to SQL literal: "; 30 31 40 void compile(Map replacements, boolean shallow) throws QueryException, MappingException; 41 42 50 List list(SessionImplementor session, QueryParameters queryParameters) 51 throws HibernateException; 52 53 61 Iterator iterate(QueryParameters queryParameters, EventSource session) 62 throws HibernateException; 63 64 72 ScrollableResults scroll(QueryParameters queryParameters, SessionImplementor session) 73 throws HibernateException; 74 75 83 int executeUpdate(QueryParameters queryParameters, SessionImplementor session) 84 throws HibernateException; 85 86 91 Set getQuerySpaces(); 92 93 98 String getSQLString(); 99 100 105 String getQueryString(); 106 107 112 Map getEnabledFilters(); 113 114 119 Type[] getReturnTypes(); 120 121 124 String [] getReturnAliases(); 125 126 131 String [][] getColumnNames(); 132 133 139 int[] getNamedParameterLocs(String name) throws QueryException; 140 141 void validateScrollability() throws HibernateException; 142 143 boolean containsCollectionFetches(); 144 } 145 | Popular Tags |