io.ebean.Query.setIncludeSoftDeletes()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(253)

本文整理了Java中io.ebean.Query.setIncludeSoftDeletes方法的一些代码示例,展示了Query.setIncludeSoftDeletes的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setIncludeSoftDeletes方法的具体详情如下:
包路径:io.ebean.Query
类名称:Query
方法名:setIncludeSoftDeletes

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.
[中]执行包含软删除行的查询。
这意味着Ebean不会向查询中添加任何谓词以过滤掉软删除的行。您仍然可以为已删除的属性添加自己的谓词,并有效地完全控制查询,以根据给定用例的需要包括或排除软删除的行。

代码示例

代码示例来源:origin: ebean-orm/ebean

@Override
public Query<T> setIncludeSoftDeletes() {
 return query.setIncludeSoftDeletes();
}

代码示例来源:origin: ebean-orm/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, DeleteMode deleteMode) {
 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 (deleteMode.isHard() && desc.isSoftDelete()) {
  // hard delete so we want this query to include logically deleted rows (if any)
  q.setIncludeSoftDeletes();
 }
 return q;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Execute the query including soft deleted rows.
 */
public R setIncludeSoftDeletes() {
 query.setIncludeSoftDeletes();
 return root;
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> setIncludeSoftDeletes() {
  q.setIncludeSoftDeletes();
  qReadOnly.setIncludeSoftDeletes();
  return this;
}

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> setIncludeSoftDeletes() {
  q.setIncludeSoftDeletes();
  return this;
}

代码示例来源:origin: io.ebean/ebean

@Override
public Query<T> setIncludeSoftDeletes() {
 return query.setIncludeSoftDeletes();
}

代码示例来源:origin: io.github.hexagonframework.data/spring-data-ebean

@Override
public void deletePermanentAll() {
  query().setIncludeSoftDeletes().delete();
}

代码示例来源:origin: hexagonframework/spring-data-ebean

@Override
public void deletePermanentAll() {
  query().setIncludeSoftDeletes().delete();
}

代码示例来源:origin: io.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, DeleteMode deleteMode) {
 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 (deleteMode.isHard() && desc.isSoftDelete()) {
  // hard delete so we want this query to include logically deleted rows (if any)
  q.setIncludeSoftDeletes();
 }
 return q;
}

代码示例来源:origin: icode/ameba

Object model;
if (includeDeleted) {
  query.setIncludeSoftDeletes();

代码示例来源:origin: icode/ameba

query.setIncludeSoftDeletes();

相关文章

Query类方法