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

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

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

Query.fetch介绍

[英]Specify a path to load including all its properties.

The same as #fetch(String,String) with the fetchProperties as "".
[中]指定要加载的路径,包括其所有属性。
与#fetch(String,String)相同,fetchProperties为“
”。

代码示例

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

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

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

@Override
public EbeanQuery<MODEL_TYPE> fetch(String path, String fetchProperties) {
  q.fetch(path, fetchProperties);
  qReadOnly.fetch(path, fetchProperties);
  return this;
}

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

@Override
public EbeanQuery<MODEL_TYPE> fetch(String path, FetchConfig joinConfig) {
  q.fetch(path, joinConfig);
  qReadOnly.fetch(path, joinConfig);
  return this;
}

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

@Override
public EbeanQuery<MODEL_TYPE> fetch(String assocProperty, String fetchProperties, FetchConfig fetchConfig) {
  q.fetch(assocProperty, fetchProperties, fetchConfig);
  qReadOnly.fetch(assocProperty, fetchProperties, fetchConfig);
  return this;
}

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

public Query<T> join(String assocProperty, String assocProperties) {
 return query.fetch(assocProperty, assocProperties);
}

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

public Query<T> join(String assocProperties) {
 return query.fetch(assocProperties);
}

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

public Query<T> join(String assocProperties) {
 return query.fetch(assocProperties);
}

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

public Query<T> join(String assocProperty, String assocProperties) {
 return query.fetch(assocProperty, assocProperties);
}

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

/**
 * Additionally specifies a <code>JoinConfig</code> to specify a 'query join' and/or define the lazy loading query.
 */
public Query<T> fetch(String path, FetchConfig joinConfig) {
  return query().fetch(path, joinConfig);
}

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

/**
 * Specifies a path to load including all its properties.
 */
public Query<T> fetch(String path) {
  return query().fetch(path);
}

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

/**
 * Specifies a path to fetch with a specific list properties to include, to load a partial object.
 */
public Query<T> fetch(String path, String fetchProperties) {
  return query().fetch(path, fetchProperties);
}

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

/**
 * Additionally specifies a <code>FetchConfig</code> to use a separate query or lazy loading to load this path.
 */
public Query<T> fetch(String assocProperty, String fetchProperties, FetchConfig fetchConfig) {
  return query().fetch(assocProperty, fetchProperties, fetchConfig);
}

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

/**
 * Apply these path properties as fetch paths to the query.
 */
public <T> void apply(Query<T> query) {
 for (Entry<String, Props> entry : pathMap.entrySet()) {
  String path = entry.getKey();
  String props = entry.getValue().getPropertiesAsString();
  if (path == null || path.isEmpty()) {
   query.select(props);
  } else {
   query.fetch(path, props);
  }
 }
}

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

/**
 * Apply these path properties as fetch paths to the query.
 */
public void apply(Query<?> query) {
 for (Entry<String, Props> entry : pathMap.entrySet()) {
  String path = entry.getKey();
  String props = entry.getValue().getPropertiesAsString();
  if (path == null || path.length() == 0) {
   query.select(props);
  } else {
   query.fetch(path, props);
  }
 }
}

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

/**
 * Apply these path properties as fetch paths to the query.
 */
public void apply(Query<?> query) {
  for (Entry<String, Props> entry : pathMap.entrySet()) {
    String path = entry.getKey();
    String props = entry.getValue().getPropertiesAsString();
    if (path == null || path.length() == 0) {
      query.select(props);
    } else {
      query.fetch(path, props);
    }
  }
}

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

/**
  * Fetch draftable element relationships.
  */
 public void draftQueryOptimise(Query<T> query) {

  BeanPropertyAssocOne<?>[] one = desc.propertiesOne();
  for (BeanPropertyAssocOne<?> anOne : one) {
   if (anOne.getTargetDescriptor().isDraftableElement()) {
    query.fetch(anOne.getName());
   }
  }

  BeanPropertyAssocMany<?>[] many = desc.propertiesMany();
  for (BeanPropertyAssocMany<?> aMany : many) {
   if (aMany.getTargetDescriptor().isDraftableElement()) {
    query.fetch(aMany.getName());
   }
  }

 }
}

相关文章