1 package org.hibernate.engine; 3 4 import java.io.Serializable ; 5 import java.util.Map ; 6 7 import org.hibernate.FlushMode; 8 9 10 15 public class NamedQueryDefinition implements Serializable { 16 private final String query; 17 private final boolean cacheable; 18 private final String cacheRegion; 19 private final Integer timeout; 20 private final Integer fetchSize; 21 private final FlushMode flushMode; 22 private final Map parameterTypes; 23 24 public NamedQueryDefinition( 25 String query, 26 boolean cacheable, 27 String cacheRegion, 28 Integer timeout, 29 Integer fetchSize, 30 FlushMode flushMode, 31 Map parameterTypes 32 ) { 33 this.query = query; 34 this.cacheable = cacheable; 35 this.cacheRegion = cacheRegion; 36 this.timeout = timeout; 37 this.fetchSize = fetchSize; 38 this.flushMode = flushMode; 39 this.parameterTypes = parameterTypes; 40 } 41 42 public String getQueryString() { 43 return query; 44 } 45 46 public boolean isCacheable() { 47 return cacheable; 48 } 49 50 public String getCacheRegion() { 51 return cacheRegion; 52 } 53 54 public Integer getFetchSize() { 55 return fetchSize; 56 } 57 58 public Integer getTimeout() { 59 return timeout; 60 } 61 62 public FlushMode getFlushMode() { 63 return flushMode; 64 } 65 66 public String toString() { 67 return getClass().getName() + '(' + query + ')'; 68 } 69 70 public Map getParameterTypes() { 71 return parameterTypes; 72 } 73 } 74 | Popular Tags |