Package org.hibernate.query.sql.internal
Class NamedNativeQueryMementoImpl
- java.lang.Object
-
- org.hibernate.query.named.AbstractNamedQueryMemento
-
- org.hibernate.query.sql.internal.NamedNativeQueryMementoImpl
-
- All Implemented Interfaces:
NamedQueryMemento,NamedNativeQueryMemento
public class NamedNativeQueryMementoImpl extends AbstractNamedQueryMemento implements NamedNativeQueryMemento
Keeps details of a named native SQL query
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.query.named.AbstractNamedQueryMemento
AbstractNamedQueryMemento.AbstractBuilder<T extends AbstractNamedQueryMemento.AbstractBuilder>
-
Nested classes/interfaces inherited from interface org.hibernate.query.sql.spi.NamedNativeQueryMemento
NamedNativeQueryMemento.Builder
-
Nested classes/interfaces inherited from interface org.hibernate.query.named.NamedQueryMemento
NamedQueryMemento.ParameterMemento
-
-
Constructor Summary
Constructors Constructor Description NamedNativeQueryMementoImpl(String name, Class<?> resultClass, String sqlString, String originalSqlString, String resultSetMappingName, Class<?> resultSetMappingClass, Set<String> querySpaces, Boolean cacheable, String cacheRegion, CacheMode cacheMode, FlushMode flushMode, Boolean readOnly, Integer timeout, Integer fetchSize, String comment, Integer firstResult, Integer maxResults, Map<String,Object> hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetFirstResult()IntegergetMaxResults()StringgetOriginalSqlString()Set<String>getQuerySpaces()The affected query spaces.Class<?>getResultMappingClass()An implicit entity mapping by entity classStringgetResultMappingName()An explicit ResultSet mapping by nameClass<?>getResultSetMappingClass()StringgetResultSetMappingName()StringgetSqlString()Informational access to the SQL query stringNamedNativeQueryMementomakeCopy(String name)Makes a copy of the memento using the specified registration name<T> NativeQueryImplementor<T>toQuery(SharedSessionContractImplementor session)Convert the memento into an untyped executable query<T> NativeQueryImplementor<T>toQuery(SharedSessionContractImplementor session, Class<T> resultType)Convert the memento into a typed executable query<T> NativeQueryImplementor<T>toQuery(SharedSessionContractImplementor session, String resultSetMappingName)Convert the memento into a typed executable queryvoidvalidate(QueryEngine queryEngine)-
Methods inherited from class org.hibernate.query.named.AbstractNamedQueryMemento
getCacheable, getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getHints, getReadOnly, getRegistrationName, getResultType, getTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.sql.spi.NamedNativeQueryMemento
getResultType
-
Methods inherited from interface org.hibernate.query.named.NamedQueryMemento
getCacheable, getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getHints, getReadOnly, getRegistrationName, getTimeout
-
-
-
-
Constructor Detail
-
NamedNativeQueryMementoImpl
public NamedNativeQueryMementoImpl(String name, Class<?> resultClass, String sqlString, String originalSqlString, String resultSetMappingName, Class<?> resultSetMappingClass, Set<String> querySpaces, Boolean cacheable, String cacheRegion, CacheMode cacheMode, FlushMode flushMode, Boolean readOnly, Integer timeout, Integer fetchSize, String comment, Integer firstResult, Integer maxResults, Map<String,Object> hints)
-
-
Method Detail
-
getResultSetMappingName
public String getResultSetMappingName()
-
getResultSetMappingClass
public Class<?> getResultSetMappingClass()
-
getQuerySpaces
public Set<String> getQuerySpaces()
Description copied from interface:NamedNativeQueryMementoThe affected query spaces.- Specified by:
getQuerySpacesin interfaceNamedNativeQueryMemento
-
getSqlString
public String getSqlString()
Description copied from interface:NamedNativeQueryMementoInformational access to the SQL query string- Specified by:
getSqlStringin interfaceNamedNativeQueryMemento
-
getOriginalSqlString
public String getOriginalSqlString()
- Specified by:
getOriginalSqlStringin interfaceNamedNativeQueryMemento
-
getResultMappingName
public String getResultMappingName()
Description copied from interface:NamedNativeQueryMementoAn explicit ResultSet mapping by name- Specified by:
getResultMappingNamein interfaceNamedNativeQueryMemento- See Also:
SqlResultSetMapping.name()
-
getResultMappingClass
public Class<?> getResultMappingClass()
Description copied from interface:NamedNativeQueryMementoAn implicit entity mapping by entity class- Specified by:
getResultMappingClassin interfaceNamedNativeQueryMemento
-
getFirstResult
public Integer getFirstResult()
- Specified by:
getFirstResultin interfaceNamedNativeQueryMemento
-
getMaxResults
public Integer getMaxResults()
- Specified by:
getMaxResultsin interfaceNamedNativeQueryMemento
-
makeCopy
public NamedNativeQueryMemento makeCopy(String name)
Description copied from interface:NamedQueryMementoMakes a copy of the memento using the specified registration name- Specified by:
makeCopyin interfaceNamedNativeQueryMemento- Specified by:
makeCopyin interfaceNamedQueryMemento
-
validate
public void validate(QueryEngine queryEngine)
- Specified by:
validatein interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session)
Description copied from interface:NamedNativeQueryMementoConvert the memento into an untyped executable query- Specified by:
toQueryin interfaceNamedNativeQueryMemento- Specified by:
toQueryin interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session, Class<T> resultType)
Description copied from interface:NamedNativeQueryMementoConvert the memento into a typed executable query- Specified by:
toQueryin interfaceNamedNativeQueryMemento- Specified by:
toQueryin interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session, String resultSetMappingName)
Description copied from interface:NamedNativeQueryMementoConvert the memento into a typed executable query- Specified by:
toQueryin interfaceNamedNativeQueryMemento
-
-