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, 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 Integer
getFirstResult()
Integer
getMaxResults()
String
getOriginalSqlString()
Set<String>
getQuerySpaces()
The affected query spaces.Class<?>
getResultMappingClass()
An implicit entity mapping by entity classString
getResultMappingName()
An explicit ResultSet mapping by nameClass<?>
getResultSetMappingClass()
String
getResultSetMappingName()
String
getSqlString()
Informational access to the SQL query stringNamedNativeQueryMemento
makeCopy(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 queryvoid
validate(QueryEngine queryEngine)
-
Methods inherited from class org.hibernate.query.named.AbstractNamedQueryMemento
getCacheable, getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getHints, getReadOnly, getRegistrationName, 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.named.NamedQueryMemento
getCacheable, getCacheMode, getCacheRegion, getComment, getFetchSize, getFlushMode, getHints, getReadOnly, getRegistrationName, getTimeout
-
-
-
-
Constructor Detail
-
NamedNativeQueryMementoImpl
public NamedNativeQueryMementoImpl(String name, 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:NamedNativeQueryMemento
The affected query spaces.- Specified by:
getQuerySpaces
in interfaceNamedNativeQueryMemento
-
getSqlString
public String getSqlString()
Description copied from interface:NamedNativeQueryMemento
Informational access to the SQL query string- Specified by:
getSqlString
in interfaceNamedNativeQueryMemento
-
getOriginalSqlString
public String getOriginalSqlString()
- Specified by:
getOriginalSqlString
in interfaceNamedNativeQueryMemento
-
getResultMappingName
public String getResultMappingName()
Description copied from interface:NamedNativeQueryMemento
An explicit ResultSet mapping by name- Specified by:
getResultMappingName
in interfaceNamedNativeQueryMemento
- See Also:
SqlResultSetMapping.name()
-
getResultMappingClass
public Class<?> getResultMappingClass()
Description copied from interface:NamedNativeQueryMemento
An implicit entity mapping by entity class- Specified by:
getResultMappingClass
in interfaceNamedNativeQueryMemento
-
getFirstResult
public Integer getFirstResult()
- Specified by:
getFirstResult
in interfaceNamedNativeQueryMemento
-
getMaxResults
public Integer getMaxResults()
- Specified by:
getMaxResults
in interfaceNamedNativeQueryMemento
-
makeCopy
public NamedNativeQueryMemento makeCopy(String name)
Description copied from interface:NamedQueryMemento
Makes a copy of the memento using the specified registration name- Specified by:
makeCopy
in interfaceNamedNativeQueryMemento
- Specified by:
makeCopy
in interfaceNamedQueryMemento
-
validate
public void validate(QueryEngine queryEngine)
- Specified by:
validate
in interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session)
Description copied from interface:NamedNativeQueryMemento
Convert the memento into an untyped executable query- Specified by:
toQuery
in interfaceNamedNativeQueryMemento
- Specified by:
toQuery
in interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session, Class<T> resultType)
Description copied from interface:NamedNativeQueryMemento
Convert the memento into a typed executable query- Specified by:
toQuery
in interfaceNamedNativeQueryMemento
- Specified by:
toQuery
in interfaceNamedQueryMemento
-
toQuery
public <T> NativeQueryImplementor<T> toQuery(SharedSessionContractImplementor session, String resultSetMappingName)
Description copied from interface:NamedNativeQueryMemento
Convert the memento into a typed executable query- Specified by:
toQuery
in interfaceNamedNativeQueryMemento
-
-