@Override protected void applyComment(String comment) { query.setComment( comment ); }
@Override public Query setComment(final String comment) { return query.setComment(comment); }
public TypedQuery<T> setComment(String comment) { query.setComment(comment); return this; }
@Override public Query setComment(String s) { return query.setComment(s); }
public Query createQuery(final String queryString) throws HibernateException { final Query query = new QueryPlaceholder(queryString); query.setComment(queryString); return query; }
private void setOptions(final Query query) { if (comment != null) { query.setComment(comment);
query.setComment( (String) value );
query.setComment( (String) value );
public Query getNamedQuery(String queryName) throws MappingException { NamedQueryDefinition nqd = factory.getNamedQuery(queryName); final Query query; if ( nqd != null ) { query = createQuery( nqd.getQueryString(), nqd.getFlushMode() ); query.setComment("named HQL query " + queryName); } else { NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryName ); if (nsqlqd==null) { throw new MappingException("Named query not known: " + queryName); } query = new SQLQueryImpl(nsqlqd, this); nqd = nsqlqd; query.setComment("named native SQL query " + queryName); } query.setCacheable( nqd.isCacheable() ); query.setCacheRegion( nqd.getCacheRegion() ); if ( nqd.getTimeout()!=null ) query.setTimeout( nqd.getTimeout().intValue() ); if ( nqd.getFetchSize()!=null ) query.setFetchSize( nqd.getFetchSize().intValue() ); return query; }
@Override public Query getNamedSQLQuery(String queryName) throws MappingException { errorIfClosed(); NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryName ); if ( nsqlqd==null ) { throw new MappingException( "Named SQL query not known: " + queryName ); } Query query = new SQLQueryImpl( nsqlqd, this, factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); initQuery( query, nsqlqd ); return query; }
public Query getNamedSQLQuery(String queryName) throws MappingException { errorIfClosed(); NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryName ); if ( nsqlqd==null ) { throw new MappingException( "Named SQL query not known: " + queryName ); } Query query = new SQLQueryImpl( nsqlqd, this, factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); initQuery( query, nsqlqd ); return query; }
private void initQuery(Query query, NamedQueryDefinition nqd) { query.setCacheable( nqd.isCacheable() ); query.setCacheRegion( nqd.getCacheRegion() ); if ( nqd.getTimeout()!=null ) query.setTimeout( nqd.getTimeout().intValue() ); if ( nqd.getFetchSize()!=null ) query.setFetchSize( nqd.getFetchSize().intValue() ); if ( nqd.getCacheMode() != null ) query.setCacheMode( nqd.getCacheMode() ); query.setReadOnly( nqd.isReadOnly() ); if ( nqd.getComment() != null ) query.setComment( nqd.getComment() ); }
private void initQuery(Query query, NamedQueryDefinition nqd) { query.setCacheable( nqd.isCacheable() ); query.setCacheRegion( nqd.getCacheRegion() ); if ( nqd.getTimeout()!=null ) query.setTimeout( nqd.getTimeout().intValue() ); if ( nqd.getFetchSize()!=null ) query.setFetchSize( nqd.getFetchSize().intValue() ); if ( nqd.getCacheMode() != null ) query.setCacheMode( nqd.getCacheMode() ); query.setReadOnly( nqd.isReadOnly() ); if ( nqd.getComment() != null ) query.setComment( nqd.getComment() ); }
private void initQuery(Query query, NamedQueryDefinition nqd) { query.setCacheable( nqd.isCacheable() ); query.setCacheRegion( nqd.getCacheRegion() ); if ( nqd.getTimeout()!=null ) query.setTimeout( nqd.getTimeout().intValue() ); if ( nqd.getFetchSize()!=null ) query.setFetchSize( nqd.getFetchSize().intValue() ); if ( nqd.getCacheMode() != null ) query.setCacheMode( nqd.getCacheMode() ); query.setReadOnly( nqd.isReadOnly() ); if ( nqd.getComment() != null ) query.setComment( nqd.getComment() ); }
@Override public Query getNamedSQLQuery(String queryName) throws MappingException { errorIfClosed(); NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryName ); if ( nsqlqd==null ) { throw new MappingException( "Named SQL query not known: " + queryName ); } Query query = new SQLQueryImpl( nsqlqd, this, factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); initQuery( query, nsqlqd ); return query; }
public Query getNamedQuery(String queryName) throws MappingException { errorIfClosed(); NamedQueryDefinition nqd = factory.getNamedQuery( queryName ); final Query query; if ( nqd != null ) { String queryString = nqd.getQueryString(); query = new QueryImpl( queryString, nqd.getFlushMode(), this, getHQLQueryPlan( queryString, false ).getParameterMetadata() ); query.setComment( "named HQL query " + queryName ); } else { NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryName ); if ( nsqlqd==null ) { throw new MappingException( "Named query not known: " + queryName ); } query = new SQLQueryImpl( nsqlqd, this, factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); nqd = nsqlqd; } initQuery( query, nqd ); return query; }
getHQLQueryPlan( queryString, false ).getParameterMetadata() ); query.setComment( "named HQL query " + queryName ); factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); nqd = nsqlqd;
getHQLQueryPlan( queryString, false ).getParameterMetadata() ); query.setComment( "named HQL query " + queryName ); factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() ) ); query.setComment( "named native SQL query " + queryName ); nqd = nsqlqd;
query.setComment(comment);