org.apache.openjpa.kernel.Query.compile()方法的使用及代码示例

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

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

Query.compile介绍

[英]Compile the query.
[中]编译查询。

代码示例

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

public void compile() {
  try {
    _query.compile();
  } catch (RuntimeException re) {
    throw translate(re);
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

public void compile() {
  try {
    _query.compile();
  } catch (RuntimeException re) {
    throw translate(re);
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

public void compile() {
  try {
    _query.compile();
  } catch (RuntimeException re) {
    throw translate(re);
  }
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public void compile() {
  try {
    _query.compile();
  } catch (RuntimeException re) {
    throw translate(re);
  }
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

public void compile() {
  try {
    _query.compile();
  } catch (RuntimeException re) {
    throw translate(re);
  }
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Object[] args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

private void loadQuery(Broker broker, QueryMetaData qmd) {
  try {
    Query q = broker.newQuery(qmd.getLanguage(), null);
    qmd.setInto(q);
    q.compile();
  } catch (Exception e) {
    if (log.isTraceEnabled()) {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage(), e);
    } else {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage());
    }
  }
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Map<Object,Object> args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Map<Object,Object> args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Object[] args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Map<Object,Object> args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Map args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange());
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

private void loadQuery(Broker broker, QueryMetaData qmd) {
  try {
    Query q = broker.newQuery(qmd.getLanguage(), null);
    qmd.setInto(q);
    q.compile();
  } catch (Exception e) {
    if (log.isTraceEnabled()) {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage(), e);
    } else {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage());
    }
  }
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

private void loadQuery(Broker broker, QueryMetaData qmd) {
  try {
    Query q = broker.newQuery(qmd.getLanguage(), null);
    qmd.setInto(q);
    q.compile();
  } catch (Exception e) {
    if (log.isTraceEnabled()) {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage(), e);
    } else {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage());
    }
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

private void loadQuery(Broker broker, QueryMetaData qmd) {
  try {
    Query q = broker.newQuery(qmd.getLanguage(), null);
    qmd.setInto(q);
    q.compile();
  } catch (Exception e) {
    if (log.isTraceEnabled()) {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage(), e);
    } else {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage());
    }
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Map<Object,Object> args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Object[] args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Object[] args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange(), null);
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return a key for the given query, or null if it is not cacheable.
 */
public static QueryKey newInstance(Query q, Object[] args) {
  // compile to make sure info encoded in query string is available
  // via API calls (candidate class, result class, etc)
  q.compile();
  return newInstance(q, false, args, q.getCandidateType(),
    q.hasSubclasses(), q.getStartRange(), q.getEndRange());
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

private void loadQuery(Broker broker, QueryMetaData qmd) {
  try {
    Query q = broker.newQuery(qmd.getLanguage(), null);
    qmd.setInto(q);
    q.compile();
  } catch (Exception e) {
    if (log.isTraceEnabled()) {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage(), e);
    } else {
      log.warn("Skipping named query " + qmd.getName() + ": "
        + e.getMessage());
    }
  }
}

相关文章