Type type) Declare a scalar query result. Parameters: columnAlias - The column alias in the result-set to be processed as a scalar resultĪddScalar SQLQuery addScalar( String columnAlias, Hibernate will attempt to automatically detect the underlying type.įunctions like in hbm.xml or ColumnResult Parameters: name - The name of the mapping to use.ĪddScalar SQLQuery addScalar( String columnAlias) Declare a scalar query result. Hibernate hbm.xml file or through a SqlResultSetMapping annotation. SetResultSetMapping SQLQuery setResultSetMapping( String name) Use a predefined named result-set mapping. Throws: MappingException - Indicates the given class could not be resolved as an entity Parameters: entit圜lass - The class of the entity upon whose defined query spaces we should additionally synchronize. Throws MappingException Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking. Throws: MappingException - Indicates the given name could not be resolved as an entityĪddSynchronizedEntit圜lass SQLQuery addSynchronizedEntit圜lass( Class entit圜lass) Parameters: entityName - The name of the entity upon whose defined query spaces we should additionally synchronize. Same asĪddSynchronizedQuerySpace() for all tables associated with the given entity. Throws MappingException Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking. Parameters: querySpace - The query space to be auto-flushed for this query.ĪddSynchronizedEntityName SQLQuery addSynchronizedEntityName( String entityName) QueryĮxecuteUpdate, getNamedParameters, getQueryString, getReturnAliases, getReturnTypes, isReadOnly, iterate, list, scroll, scroll, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCacheable, setCacheMode, setCacheRegion, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setComment, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFetchSize, setFirstResult, setFloat, setFloat, setFlushMode, setInteger, setInteger, setLocale, setLocale, setLockMode, setLockOptions, setLong, setLong, setMaxResults, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setResultTransformer, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, uniqueResultĪddSynchronizedQuerySpace SQLQuery addSynchronizedQuerySpace( String querySpace) Adds a query space (table name) for (a) auto-flush checking and (b) query result cache invalidation checking Methods inherited from interface org.hibernate. Use a predefined named result-set mapping. Defined locally per the various addEntity(), addRoot(, ), addJoin(, ), addFetch(,, ) and addScalar() methodsĪllows access to further control how join fetch returns are mapped back from result setsĪllows access to further control how properties within a root or join fetch are mapped back from the result set.Īllows access to further control how root returns are mapped back from result setsĭeclare a "root" entity, without specifying an alias.ĭeclare a "root" entity, specifying a lock modeĭeclare a join fetch result, specifying a lock modeĪdd a new root return mapping, returning a SQLQuery.RootReturn to allow further definitionĪddSynchronizedEntit圜lass( Class entit圜lass)Īdds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.ĪddSynchronizedEntityName( String entityName)Īdds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.ĪddSynchronizedQuerySpace( String querySpace)Īdds a query space (table name) for (a) auto-flush checking and (b) query result cache invalidation checking.A pre-defined (defined in metadata and named) mapping can be associated with setResultSetMapping().If this represents a named sql query, the mapping could be associated with the query as part of its metadata.In terms of result-set mapping, there are 3 approaches to defining: This allows Hibernate to properly know how to deal with auto-flush checkingĪs well as cached query results if the results of the query are being cached. Tables used via addSynchronizedQuerySpace(), addSynchronizedEntityName() andĪddSynchronizedEntit圜lass(). Represents a "native sql" query and allows the user to define certain aspects about its execution, such as: Interface SQLQuery All Superinterfaces: Query All Known Implementing Classes: SQLQueryImpl SUMMARY: NESTED | FIELD | CONSTR | METHOD
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |