com.avaje.ebean.Query.getExpressionFactory()方法的使用及代码示例

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

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

Query.getExpressionFactory介绍

[英]Return the ExpressionFactory used by this query.
[中]返回此查询使用的ExpressionFactory。

代码示例

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

@Override
public ExpressionFactory getExpressionFactory() {
  return qReadOnly.getExpressionFactory();
}

代码示例来源:origin: org.avaje.ebean/ebean

public DefaultExpressionList(Query<T> query, ExpressionList<T> parentExprList) {
 this(query, query.getExpressionFactory(), parentExprList);
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server

public DefaultExpressionList(Query<T> query, ExpressionList<T> parentExprList) {
 this(query, query.getExpressionFactory(), parentExprList);
}

代码示例来源:origin: org.avaje/ebean

public DefaultExpressionList(Query<T> query, ExpressionList<T> parentExprList) {
 this(query, query.getExpressionFactory(), parentExprList);
}

代码示例来源:origin: org.avaje.ebean/ebean

/**
 * Construct for Text root expression list - this handles implicit Bool Should, Must etc.
 */
public DefaultExpressionList(Query<T> query) {
 this(query, query.getExpressionFactory(), null, new ArrayList<>(), true);
}

代码示例来源:origin: com.typesafe.play/play-java-ebean

/**
 * Returns the <code>ExpressionFactory</code> used by this query.
 */
public ExpressionFactory getExpressionFactory() {
  return query().getExpressionFactory();
}

代码示例来源:origin: org.avaje.ebean/ebean

/**
 * Return the expressions used to filter on this path. This should be a many path to use this
 * method.
 */
@SuppressWarnings({"rawtypes", "unchecked"})
public <T> SpiExpressionList<T> filterMany(Query<T> rootQuery) {
 if (filterMany == null) {
  FilterExprPath exprPath = new FilterExprPath(path);
  SpiExpressionFactory queryEf = (SpiExpressionFactory) rootQuery.getExpressionFactory();
  ExpressionFactory filterEf = queryEf.createExpressionFactory();// exprPath);
  filterMany = new FilterExpressionList(exprPath, filterEf, rootQuery);
  // by default we need to make this a 'query join' now
  markForQueryJoin = true;
 }
 return filterMany;
}

代码示例来源:origin: org.avaje/ebean

/**
 * Return the expressions used to filter on this path.
 * This should be a many path to use this method.
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public <T> SpiExpressionList<T> filterMany(Query<T> rootQuery) {
  if (filterMany == null){
    FilterExprPath exprPath = new FilterExprPath(path);
    SpiExpressionFactory queryEf = (SpiExpressionFactory)rootQuery.getExpressionFactory();
    ExpressionFactory filterEf = queryEf.createExpressionFactory(exprPath);
    filterMany = new FilterExpressionList(exprPath, filterEf, rootQuery);
    // by default we need to make this a 'query join' now
    queryFetchAll = true;
    queryFetchBatch = 100;
    lazyFetchBatch = 100;
  }
  return filterMany;
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server

/**
 * Return the expressions used to filter on this path.
 * This should be a many path to use this method.
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public <T> SpiExpressionList<T> filterMany(Query<T> rootQuery) {
  if (filterMany == null){
    FilterExprPath exprPath = new FilterExprPath(path);
    SpiExpressionFactory queryEf = (SpiExpressionFactory)rootQuery.getExpressionFactory();
    ExpressionFactory filterEf = queryEf.createExpressionFactory(exprPath);
    filterMany = new FilterExpressionList(exprPath, filterEf, rootQuery);
    // by default we need to make this a 'query join' now
    queryFetchAll = true;
    queryFetchBatch = 100;
    lazyFetchBatch = 100;
  }
  return filterMany;
}

代码示例来源:origin: org.avaje/ebean

private List<Object> findIdsByParentIdList(List<Object> parentIdist, Transaction t, ArrayList<Object> excludeDetailIds) {
  String rawWhere = deriveWhereParentIdSql(true);
  String inClause = targetIdBinder.getIdInValueExpr(parentIdist.size());
  
  String expr = rawWhere+inClause;
  
  EbeanServer server = getBeanDescriptor().getEbeanServer();
  Query<?> q = server.find(getPropertyType())
    .where().raw(expr).query();
    int pos = 1;
  for (int i = 0; i < parentIdist.size(); i++) {            
    pos = bindWhereParendId(pos, q, parentIdist.get(i));
  }
  
  if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
    Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
    q.where().not(idIn);
  }
  
  return server.findIds(q, t);
}

代码示例来源:origin: org.avaje.ebean/ebean

private List<Object> findIdsByParentId(Object parentId, Transaction t, ArrayList<Object> excludeDetailIds) {
 String rawWhere = deriveWhereParentIdSql(false, "");
 List<Object> bindValues = new ArrayList<>();
 bindWhereParentId(bindValues, parentId);
 EbeanServer server = getBeanDescriptor().getEbeanServer();
 Query<?> q = server.find(getPropertyType())
   .where()
   .raw(rawWhere, bindValues.toArray())
   .query();
 if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
  Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
  q.where().not(idIn);
 }
 return server.findIds(q, t);
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server

private List<Object> findIdsByParentIdList(List<Object> parentIdist, Transaction t, ArrayList<Object> excludeDetailIds) {
  String rawWhere = deriveWhereParentIdSql(true);
  String inClause = targetIdBinder.getIdInValueExpr(parentIdist.size());
  
  String expr = rawWhere+inClause;
  
  EbeanServer server = getBeanDescriptor().getEbeanServer();
  Query<?> q = server.find(getPropertyType())
    .where().raw(expr).query();
    int pos = 1;
  for (int i = 0; i < parentIdist.size(); i++) {            
    pos = bindWhereParendId(pos, q, parentIdist.get(i));
  }
  
  if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
    Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
    q.where().not(idIn);
  }
  
  return server.findIds(q, t);
}

代码示例来源:origin: org.avaje.ebean/ebean

private List<Object> findIdsByParentIdList(List<Object> parentIdList, Transaction t, ArrayList<Object> excludeDetailIds) {
 String rawWhere = deriveWhereParentIdSql(true, "");
 String inClause = buildInClauseBinding(parentIdList.size(), exportedPropertyBindProto);
 String expr = rawWhere + inClause;
 List<Object> bindValues = new ArrayList<>();
 for (Object aParentIdList : parentIdList) {
  bindWhereParentId(bindValues, aParentIdList);
 }
 EbeanServer server = getBeanDescriptor().getEbeanServer();
 Query<?> q = server.find(getPropertyType())
   .where()
   .raw(expr, bindValues.toArray())
   .query();
 if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
  Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
  q.where().not(idIn);
 }
 return server.findIds(q, t);
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server

private List<Object> findIdsByParentId(Object parentId, Transaction t, ArrayList<Object> excludeDetailIds) {
  
  String rawWhere = deriveWhereParentIdSql(false);
  
  EbeanServer server = getBeanDescriptor().getEbeanServer();
  Query<?> q = server.find(getPropertyType())
    .where().raw(rawWhere).query();
  
  bindWhereParendId(1, q, parentId);
  
  if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
    Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
    q.where().not(idIn);
  }
  
  return server.findIds(q, t);
}

代码示例来源:origin: org.avaje/ebean

private List<Object> findIdsByParentId(Object parentId, Transaction t, ArrayList<Object> excludeDetailIds) {
  
  String rawWhere = deriveWhereParentIdSql(false);
  
  EbeanServer server = getBeanDescriptor().getEbeanServer();
  Query<?> q = server.find(getPropertyType())
    .where().raw(rawWhere).query();
  
  bindWhereParendId(1, q, parentId);
  
  if (excludeDetailIds != null && !excludeDetailIds.isEmpty()) {
    Expression idIn = q.getExpressionFactory().idIn(excludeDetailIds);
    q.where().not(idIn);
  }
  
  return server.findIds(q, t);
}

相关文章