本文整理了Java中io.ebean.Query.setParameter
方法的一些代码示例,展示了Query.setParameter
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setParameter
方法的具体详情如下:
包路径:io.ebean.Query
类名称:Query
方法名:setParameter
[英]Set an ordered bind parameter according to its position. Note that the position starts at 1 to be consistent with JDBC PreparedStatement. You need to set a parameter value for each ? you have in the query.
// a query with a positioned parameter
[中]根据其位置设置有序绑定参数。注意,这个位置从1开始,与JDBC PreparedStatement一致。您需要为每个设置一个参数值吗?您在查询中有一个
// a query with a positioned parameter
代码示例来源:origin: org.actframework/act-ebean2
@Override
public EbeanQuery<MODEL_TYPE> setParameter(int position, Object value) {
q.setParameter(position, value);
return this;
}
代码示例来源:origin: org.actframework/act-ebean
@Override
public EbeanQuery<MODEL_TYPE> setParameter(String name, Object value) {
q.setParameter(name, value);
qReadOnly.setParameter(name, value);
return this;
}
代码示例来源:origin: org.actframework/act-ebean
@Override
public EbeanQuery<MODEL_TYPE> setParameter(int position, Object value) {
q.setParameter(position, value);
qReadOnly.setParameter(position, value);
return this;
}
代码示例来源:origin: org.actframework/act-ebean2
@Override
public EbeanQuery<MODEL_TYPE> setParameter(String name, Object value) {
q.setParameter(name, value);
return this;
}
代码示例来源:origin: icode/ameba
/**
* {@inheritDoc}
* Sets an ordered bind parameter according to its position.
*/
public Query<T> setParameter(int position, Object value) {
return query().setParameter(position, value);
}
代码示例来源:origin: icode/ameba
/**
* {@inheritDoc}
* Sets a named bind parameter.
*/
public Query<T> setParameter(String name, Object value) {
return query().setParameter(name, value);
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
void setParameter(String name, Object value) {
switch (queryType) {
case QUERY:
((Query) queryInstance).setParameter(name, value);
break;
case UPDATE:
((Update) queryInstance).setParameter(name, value);
break;
case SQL_UPDATE:
((SqlUpdate) queryInstance).setParameter(name, value);
break;
default:
throw new IllegalArgumentException("query not supported!");
}
}
代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean
void setParameter(int position, Object value) {
switch (queryType) {
case QUERY:
((Query) queryInstance).setParameter(position, value);
break;
case UPDATE:
((Update) queryInstance).setParameter(position, value);
break;
case SQL_UPDATE:
((SqlUpdate) queryInstance).setParameter(position, value);
break;
default:
throw new IllegalArgumentException("query not supported!");
}
}
代码示例来源:origin: hexagonframework/spring-data-ebean
void setParameter(int position, Object value) {
switch (queryType) {
case QUERY:
((Query) queryInstance).setParameter(position, value);
break;
case UPDATE:
((Update) queryInstance).setParameter(position, value);
break;
case SQL_UPDATE:
((SqlUpdate) queryInstance).setParameter(position, value);
break;
default:
throw new IllegalArgumentException("query not supported!");
}
}
代码示例来源:origin: hexagonframework/spring-data-ebean
void setParameter(String name, Object value) {
switch (queryType) {
case QUERY:
((Query) queryInstance).setParameter(name, value);
break;
case UPDATE:
((Update) queryInstance).setParameter(name, value);
break;
case SQL_UPDATE:
((SqlUpdate) queryInstance).setParameter(name, value);
break;
default:
throw new IllegalArgumentException("query not supported!");
}
}
内容来源于网络,如有侵权,请联系作者删除!