本文整理了Java中com.avaje.ebean.Query.setIncludeSoftDeletes
方法的一些代码示例,展示了Query.setIncludeSoftDeletes
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setIncludeSoftDeletes
方法的具体详情如下:
包路径:com.avaje.ebean.Query
类名称:Query
方法名:setIncludeSoftDeletes
[英]Execute the query including soft deleted rows.
This means that Ebean will not add any predicates to the query for filtering out soft deleted rows. You can still add your own predicates for the deleted properties and effectively you have full control over the query to include or exclude soft deleted rows as needed for a given use case.
[中]
代码示例来源:origin: org.actframework/act-ebean-java7
@Override
public EbeanQuery<MODEL_TYPE> setIncludeSoftDeletes() {
q.setIncludeSoftDeletes();
qReadOnly.setIncludeSoftDeletes();
return this;
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public Query<T> setIncludeSoftDeletes() {
return query.setIncludeSoftDeletes();
}
代码示例来源:origin: org.avaje.ebean/ebean
/**
* We need to create and execute a query to get the foreign key values as
* the delete cascades to them (foreign keys).
*/
private Query<?> deleteRequiresQuery(BeanDescriptor<?> desc, BeanPropertyAssocOne<?>[] propImportDelete, boolean softDelete) {
Query<?> q = server.createQuery(desc.getBeanType());
StringBuilder sb = new StringBuilder(30);
for (BeanPropertyAssocOne<?> aPropImportDelete : propImportDelete) {
sb.append(aPropImportDelete.getName()).append(",");
}
q.setAutoTune(false);
q.select(sb.toString());
if (!softDelete) {
// hard delete so we want this query to include logically deleted rows (if any)
q.setIncludeSoftDeletes();
}
return q;
}
内容来源于网络,如有侵权,请联系作者删除!