本文整理了Java中org.apache.polygene.api.query.Query.setVariable
方法的一些代码示例,展示了Query.setVariable
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setVariable
方法的具体详情如下:
包路径:org.apache.polygene.api.query.Query
类名称:Query
方法名:setVariable
[英]Set the value of a named variable.
[中]设置命名变量的值。
代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.testsupport
@Test
public void script24()
{
final Query<Domain> query = unitOfWork.newQuery( this.moduleInstance
.newQueryBuilder( Domain.class )
.where( queries.get( "script24" ) ) );
query.setVariable( "domain", "Gaming" );
System.out.println( "*** script24: " + query );
assertThat( query.find().name().get(), is( equalTo( "Gaming" ) ) );
}
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void script24()
{
final Query<Domain> query = unitOfWork.newQuery( this.moduleInstance
.newQueryBuilder( Domain.class )
.where( queries.get( "script24" ) ) );
query.setVariable( "domain", "Gaming" );
System.out.println( "*** script24: " + query );
assertThat( query.find().name().get(), is( equalTo( "Gaming" ) ) );
}
}
内容来源于网络,如有侵权,请联系作者删除!