本文整理了Java中org.hibernate.Query.setComment
方法的一些代码示例,展示了Query.setComment
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setComment
方法的具体详情如下:
包路径:org.hibernate.Query
类名称:Query
方法名:setComment
[英]Set the comment for this query.
[中]设置此查询的注释。
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.ejb
@Override
protected void applyComment(String comment) {
query.setComment( comment );
}
代码示例来源:origin: ezbz/projectx
@Override
public Query setComment(final String comment) {
return query.setComment(comment);
}
代码示例来源:origin: riotfamily/riot
public TypedQuery<T> setComment(String comment) {
query.setComment(comment);
return this;
}
代码示例来源:origin: com.github.cafdataprocessing/corepolicy-hibernate
@Override
public Query setComment(String s) {
return query.setComment(s);
}
代码示例来源:origin: org.nakedobjects/nos-objectstore-hibernate
public Query createQuery(final String queryString) throws HibernateException {
final Query query = new QueryPlaceholder(queryString);
query.setComment(queryString);
return query;
}
代码示例来源:origin: org.nakedobjects/nos-objectstore-hibernate
private void setOptions(final Query query) {
if (comment != null) {
query.setComment(comment);
代码示例来源:origin: hibernate/hibernate-entitymanager
query.setComment( (String) value );
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
query.setComment( (String) value );
代码示例来源:origin: hibernate/hibernate
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;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
@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;
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
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;
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
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() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
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() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
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() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
@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;
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
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;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
getHQLQueryPlan( queryString, false ).getParameterMetadata()
);
query.setComment( "named HQL query " + queryName );
factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() )
);
query.setComment( "named native SQL query " + queryName );
nqd = nsqlqd;
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
getHQLQueryPlan( queryString, false ).getParameterMetadata()
);
query.setComment( "named HQL query " + queryName );
factory.getQueryPlanCache().getSQLParameterMetadata( nsqlqd.getQueryString() )
);
query.setComment( "named native SQL query " + queryName );
nqd = nsqlqd;
代码示例来源:origin: com.querydsl/querydsl-jpa
query.setComment(comment);
内容来源于网络,如有侵权,请联系作者删除!