QueryBinder.bindSqlResultSetMapping( ann, context, false ); if ( ann != null ) { for ( SqlResultSetMapping current : ann.value() ) { QueryBinder.bindSqlResultSetMapping( current, context, false ); QueryBinder.bindQuery( ann, context, false ); org.hibernate.annotations.NamedQuery.class ); QueryBinder.bindQuery( ann, context ); QueryBinder.bindQueries( ann, context, false ); org.hibernate.annotations.NamedQueries.class ); QueryBinder.bindQueries( ann, context ); QueryBinder.bindNativeQuery( ann, context, false ); org.hibernate.annotations.NamedNativeQuery.class ); QueryBinder.bindNativeQuery( ann, context ); QueryBinder.bindNativeQueries( ann, context, false ); org.hibernate.annotations.NamedNativeQueries.class ); QueryBinder.bindNativeQueries( ann, context );
private static Integer getTimeout(String queryName, QueryHint[] hints) { Integer timeout = getInteger( queryName, "javax.persistence.query.timeout", hints ); if ( timeout != null ) { // convert milliseconds to seconds timeout = new Integer ((int)Math.round(timeout.doubleValue() / 1000.0 ) ); } else { // timeout is already in seconds timeout = getInteger( queryName, "org.hibernate.timeout", hints ); } return timeout; } }
if ( anns != null ) { for ( NamedQuery ann : anns ) { QueryBinder.bindQuery( ann, context, true ); if ( anns != null ) { for ( NamedNativeQuery ann : anns ) { QueryBinder.bindNativeQuery( ann, context, true ); if ( anns != null ) { for ( SqlResultSetMapping ann : anns ) { QueryBinder.bindSqlResultSetMapping( ann, context, true );
public static void bindQuery(NamedQuery queryAnn, ExtendedMappings mappings, boolean isDefault) { if ( queryAnn == null ) return; if ( BinderHelper.isDefault( queryAnn.name() ) ) { throw new AnnotationException( "A named query must have a name when used in class or package level" ); } //EJBQL Query QueryHint[] hints = queryAnn.hints(); String queryName = queryAnn.query(); NamedQueryDefinition query = new NamedQueryDefinition( queryName, getBoolean( queryName, "org.hibernate.cacheable", hints ), getString( queryName, "org.hibernate.cacheRegion", hints ), getTimeout( queryName, hints ), getInteger( queryName, "org.hibernate.fetchSize", hints ), getFlushMode( queryName, hints ), getCacheMode( queryName, hints ), getBoolean( queryName, "org.hibernate.readOnly", hints ), getString( queryName, "org.hibernate.comment", hints ), null ); if ( isDefault ) { mappings.addDefaultQuery( queryAnn.name(), query ); } else { mappings.addQuery( queryAnn.name(), query ); } log.info( "Binding Named query: {} => {}", queryAnn.name(), queryAnn.query() ); }
QueryBinder.bindSqlResultsetMapping( ann, mappings, false ); if ( ann != null ) { for ( SqlResultSetMapping current : ann.value() ) { QueryBinder.bindSqlResultsetMapping( current, mappings, false ); QueryBinder.bindQuery( ann, mappings, false ); org.hibernate.annotations.NamedQuery.class ); QueryBinder.bindQuery( ann, mappings ); QueryBinder.bindQueries( ann, mappings, false ); org.hibernate.annotations.NamedQueries.class ); QueryBinder.bindQueries( ann, mappings ); QueryBinder.bindNativeQuery( ann, mappings, false ); org.hibernate.annotations.NamedNativeQuery.class ); QueryBinder.bindNativeQuery( ann, mappings ); QueryBinder.bindNativeQueries( ann, mappings, false ); org.hibernate.annotations.NamedNativeQueries.class ); QueryBinder.bindNativeQueries( ann, mappings );
.setFlushMode( getFlushMode( queryAnn.flushMode() ) ) .setCacheMode( getCacheMode( queryAnn.cacheMode() ) ) .setReadOnly( queryAnn.readOnly() ) .setComment( BinderHelper.isEmptyAnnotationValue( queryAnn.comment() ) ? null : queryAnn.comment() ) .setFlushMode( getFlushMode( queryAnn.flushMode() ) ) .setCacheMode( getCacheMode( queryAnn.cacheMode() ) ) .setReadOnly( queryAnn.readOnly() ) .setComment( BinderHelper.isEmptyAnnotationValue( queryAnn.comment() ) ? null : queryAnn.comment() )
if ( anns != null ) { for ( NamedQuery ann : anns ) { QueryBinder.bindQuery( ann, mappings, true ); if ( anns != null ) { for ( NamedNativeQuery ann : anns ) { QueryBinder.bindNativeQuery( ann, mappings, true ); if ( anns != null ) { for ( SqlResultSetMapping ann : anns ) { QueryBinder.bindSqlResultsetMapping( ann, mappings, true );
public static void bindQueries(NamedQueries queriesAnn, MetadataBuildingContext context, boolean isDefault) { if ( queriesAnn == null ) { return; } for (NamedQuery q : queriesAnn.value()) { bindQuery( q, context, isDefault ); } }
public static void bindNativeQueries( org.hibernate.annotations.NamedNativeQueries queriesAnn, MetadataBuildingContext context) { if ( queriesAnn == null ) { return; } for (org.hibernate.annotations.NamedNativeQuery q : queriesAnn.value()) { bindNativeQuery( q, context ); } }
queryAnn.timeout() < 0 ? null : queryAnn.timeout(), queryAnn.fetchSize() < 0 ? null : queryAnn.fetchSize(), getFlushMode( queryAnn.flushMode() ), getCacheMode( queryAnn.cacheMode() ), queryAnn.readOnly(), queryAnn.timeout() < 0 ? null : queryAnn.timeout(), queryAnn.fetchSize() < 0 ? null : queryAnn.fetchSize(), getFlushMode( queryAnn.flushMode() ), getCacheMode( queryAnn.cacheMode() ), queryAnn.readOnly(),
resultSetMapping, null, getBoolean( queryName, "org.hibernate.cacheable", hints ), getString( queryName, "org.hibernate.cacheRegion", hints ), getTimeout( queryName, hints ), getInteger( queryName, "org.hibernate.fetchSize", hints ), getFlushMode( queryName, hints ), getCacheMode( queryName, hints ), getBoolean( queryName, "org.hibernate.readOnly", hints ), getString( queryName, "org.hibernate.comment", hints ), null, getBoolean( queryName, "org.hibernate.callable", hints ) ); new NativeSQLQueryReturn[] { entityQueryReturn }, null, getBoolean( queryName, "org.hibernate.cacheable", hints ), getString( queryName, "org.hibernate.cacheRegion", hints ), getTimeout( queryName, hints ), getInteger( queryName, "org.hibernate.fetchSize", hints ), getFlushMode( queryName, hints ), getCacheMode( queryName, hints ), getBoolean( queryName, "org.hibernate.readOnly", hints ),
QueryBinder.bindSqlResultsetMapping( ann, mappings, false ); if ( ann != null ) { for ( SqlResultSetMapping current : ann.value() ) { QueryBinder.bindSqlResultsetMapping( current, mappings, false ); QueryBinder.bindQuery( ann, mappings, false ); org.hibernate.annotations.NamedQuery.class ); QueryBinder.bindQuery( ann, mappings ); QueryBinder.bindQueries( ann, mappings, false ); org.hibernate.annotations.NamedQueries.class ); QueryBinder.bindQueries( ann, mappings ); QueryBinder.bindNativeQuery( ann, mappings, false ); org.hibernate.annotations.NamedNativeQuery.class ); QueryBinder.bindNativeQuery( ann, mappings ); QueryBinder.bindNativeQueries( ann, mappings, false ); org.hibernate.annotations.NamedNativeQueries.class ); QueryBinder.bindNativeQueries( ann, mappings );
flushMode = getFlushMode( queryAnn.flushMode() ); .setFetchSize( queryAnn.fetchSize() < 0 ? null : queryAnn.fetchSize() ) .setFlushMode( flushMode ) .setCacheMode( getCacheMode( queryAnn.cacheMode() ) ) .setReadOnly( queryAnn.readOnly() ) .setComment( BinderHelper.isEmptyAnnotationValue( queryAnn.comment() ) ? null : queryAnn.comment() )
if ( anns != null ) { for ( NamedQuery ann : anns ) { QueryBinder.bindQuery( ann, mappings, true ); if ( anns != null ) { for ( NamedNativeQuery ann : anns ) { QueryBinder.bindNativeQuery( ann, mappings, true ); if ( anns != null ) { for ( SqlResultSetMapping ann : anns ) { QueryBinder.bindSqlResultsetMapping( ann, mappings, true );
public static void bindQueries( org.hibernate.annotations.NamedQueries queriesAnn, MetadataBuildingContext context) { if ( queriesAnn == null ) { return; } for (org.hibernate.annotations.NamedQuery q : queriesAnn.value()) { bindQuery( q, context ); } }
public static void bindNativeQueries( NamedNativeQueries queriesAnn, MetadataBuildingContext context, boolean isDefault) { if ( queriesAnn == null ) { return; } for (NamedNativeQuery q : queriesAnn.value()) { bindNativeQuery( q, context, isDefault ); } }
if ( anns != null ) { for ( NamedQuery ann : anns ) { QueryBinder.bindQuery( ann, context, true ); if ( anns != null ) { for ( NamedNativeQuery ann : anns ) { QueryBinder.bindNativeQuery( ann, context, true ); if ( anns != null ) { for ( SqlResultSetMapping ann : anns ) { QueryBinder.bindSqlResultSetMapping( ann, context, true );
public static void bindQuery(NamedQuery queryAnn, ExtendedMappings mappings, boolean isDefault) { if ( queryAnn == null ) return; if ( BinderHelper.isDefault( queryAnn.name() ) ) { throw new AnnotationException( "A named query must have a name when used in class or package level" ); } //EJBQL Query QueryHint[] hints = queryAnn.hints(); String queryName = queryAnn.query(); NamedQueryDefinition query = new NamedQueryDefinition( queryName, getBoolean( queryName, "org.hibernate.cacheable", hints ), getString( queryName, "org.hibernate.cacheRegion", hints ), getInteger( queryName, "org.hibernate.timeout", hints ), getInteger( queryName, "org.hibernate.fetchSize", hints ), getFlushMode( queryName, hints ), getCacheMode( queryName, hints ), getBoolean( queryName, "org.hibernate.readOnly", hints ), getString( queryName, "org.hibernate.comment", hints ), null ); if (isDefault) { mappings.addDefaultQuery( queryAnn.name(), query ); } else { mappings.addQuery( queryAnn.name(), query ); } if ( log.isInfoEnabled() ) log.info( "Binding Named query: " + queryAnn.name() + " => " + queryAnn.query() ); }
QueryBinder.bindSqlResultsetMapping( ann, mappings, false ); if ( ann != null ) { for ( SqlResultSetMapping current : ann.value() ) { QueryBinder.bindSqlResultsetMapping( current, mappings, false ); QueryBinder.bindQuery( ann, mappings, false ); org.hibernate.annotations.NamedQuery.class ); QueryBinder.bindQuery( ann, mappings ); QueryBinder.bindQueries( ann, mappings, false ); org.hibernate.annotations.NamedQueries.class ); QueryBinder.bindQueries( ann, mappings ); QueryBinder.bindNativeQuery( ann, mappings, false ); org.hibernate.annotations.NamedNativeQuery.class ); QueryBinder.bindNativeQuery( ann, mappings ); QueryBinder.bindNativeQueries( ann, mappings, false ); org.hibernate.annotations.NamedNativeQueries.class ); QueryBinder.bindNativeQueries( ann, mappings );
QueryBinder.bindSqlResultSetMapping( ann, context, false ); if ( ann != null ) { for ( SqlResultSetMapping current : ann.value() ) { QueryBinder.bindSqlResultSetMapping( current, context, false ); QueryBinder.bindQuery( ann, context, false ); org.hibernate.annotations.NamedQuery.class ); QueryBinder.bindQuery( ann, context ); QueryBinder.bindQueries( ann, context, false ); org.hibernate.annotations.NamedQueries.class ); QueryBinder.bindQueries( ann, context ); QueryBinder.bindNativeQuery( ann, context, false ); org.hibernate.annotations.NamedNativeQuery.class ); QueryBinder.bindNativeQuery( ann, context ); QueryBinder.bindNativeQueries( ann, context, false ); org.hibernate.annotations.NamedNativeQueries.class ); QueryBinder.bindNativeQueries( ann, context );