org.intermine.objectstore.query.Query.getFrom()方法的使用及代码示例

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

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

Query.getFrom介绍

[英]Returns all FromElements in the FROM clause
[中]返回FROM子句中的所有FromElements

代码示例

代码示例来源:origin: org.intermine/intermine-objectstore

Iterator<FromElement> fromIter = q.getFrom().iterator();
while (fromIter.hasNext() && allPresent) {
  FromElement qc = fromIter.next();

代码示例来源:origin: intermine/intermine

Iterator<FromElement> fromIter = q.getFrom().iterator();
while (fromIter.hasNext() && allPresent) {
  FromElement qc = fromIter.next();

代码示例来源:origin: intermine/intermine

for (FromElement fe : q.getFrom()) {
  String classAlias = escapeReservedWord(q.getAliases().get(fe));
  retval.append(needComma ? ", " : " FROM ");

代码示例来源:origin: org.intermine/intermine-objectstore

for (FromElement fe : q.getFrom()) {
  String classAlias = escapeReservedWord(q.getAliases().get(fe));
  retval.append(needComma ? ", " : " FROM ");

代码示例来源:origin: intermine/intermine

if (sr instanceof SingletonResults) {
  Query existingQ = ((SingletonResults) sr).getQuery();
  if ((existingQ.getFrom().size() == 1)
      && (existingQ.getConstraint()
        instanceof BagConstraint)) {
        && (bc.getOp() == ConstraintOp.IN)) {
      QueryField qf = (QueryField) bc.getQueryNode();
      if (qf.getFromElement().equals(existingQ.getFrom()
            .iterator().next())
          && "id".equals(qf.getFieldName())) {

代码示例来源:origin: intermine/intermine

for (FromElement fe : q.getFrom()) {
  if (fe instanceof QueryClassBag) {
    QueryClassBag qcb = (QueryClassBag) fe;

代码示例来源:origin: org.intermine/intermine-objectstore

for (FromElement fe : q.getFrom()) {
  if (fe instanceof QueryClassBag) {
    QueryClassBag qcb = (QueryClassBag) fe;

代码示例来源:origin: intermine/intermine

for (FromElement fromElement : q.getFrom()) {
  if (fromElement instanceof QueryClass) {
    for (Class<?> cls : Util.decomposeClass(((QueryClass) fromElement)

代码示例来源:origin: org.intermine/intermine-objectstore

for (FromElement fromElement : q.getFrom()) {
  if (fromElement instanceof QueryClass) {
    for (Class<?> cls : Util.decomposeClass(((QueryClass) fromElement)

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

for (FromElement fromElement : new HashSet<FromElement>(queryCopy.getFrom())) {
  if (fromElement instanceof QueryClass) {
    QueryClass queryClass = (QueryClass) fromElement;

代码示例来源:origin: intermine/intermine

for (FromElement fromElement : new HashSet<FromElement>(queryCopy.getFrom())) {
  if (fromElement instanceof QueryClass) {
    QueryClass queryClass = (QueryClass) fromElement;

代码示例来源:origin: intermine/intermine

if (qs instanceof QueryCollectionPathExpression) {
  Query subQ = ((QueryCollectionPathExpression) qs).getQuery(null);
  if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) {
    LOG.error("Software bug - we are being asked to precompute a cross "
        + "join for query " + q + ". Cross join: " + subQ);
  Query subQ = ((QueryObjectPathExpression) qs).getQuery(null,
      getSchema().isMissingNotXml());
  if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) {
    LOG.error("Software bug - we are being asked to precompute a cross "
        + "join for query " + q + ". Cross join: " + subQ);

代码示例来源:origin: org.intermine/intermine-objectstore

if (qs instanceof QueryCollectionPathExpression) {
  Query subQ = ((QueryCollectionPathExpression) qs).getQuery(null);
  if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) {
    LOG.error("Software bug - we are being asked to precompute a cross "
        + "join for query " + q + ". Cross join: " + subQ);
  Query subQ = ((QueryObjectPathExpression) qs).getQuery(null,
      getSchema().isMissingNotXml());
  if ((subQ.getFrom().size() > 1) && (subQ.getConstraint() == null)) {
    LOG.error("Software bug - we are being asked to precompute a cross "
        + "join for query " + q + ". Cross join: " + subQ);

代码示例来源:origin: intermine/intermine

for (FromElement fromElement : q.getFrom()) {
  if (fromElement instanceof QueryClass) {
    QueryClass qc = (QueryClass) fromElement;

代码示例来源:origin: org.intermine/intermine-objectstore

for (FromElement fromElement : q.getFrom()) {
  if (fromElement instanceof QueryClass) {
    QueryClass qc = (QueryClass) fromElement;

代码示例来源:origin: org.intermine/intermine-objectstore

Map<QueryObjectPathExpression, QueryObjectPathExpression> qopeMap =
  new HashMap<QueryObjectPathExpression, QueryObjectPathExpression>();
for (FromElement origFrom : query.getFrom()) {
  FromElement newFrom = null;
  if (origFrom instanceof QueryClass) {

代码示例来源:origin: intermine/intermine

Map<QueryObjectPathExpression, QueryObjectPathExpression> qopeMap =
  new HashMap<QueryObjectPathExpression, QueryObjectPathExpression>();
for (FromElement origFrom : query.getFrom()) {
  FromElement newFrom = null;
  if (origFrom instanceof QueryClass) {

代码示例来源:origin: org.intermine/intermine-integrate

Set<FromElement> from = query.getFrom();
QueryNode qn = (QueryNode) select.get(0);
if (!(select.size() == 1

代码示例来源:origin: intermine/intermine

Set<FromElement> from = query.getFrom();
QueryNode qn = (QueryNode) select.get(0);
if (!(select.size() == 1

代码示例来源:origin: intermine/intermine

/**
 * The absence of a proper Query.equals() method means that we
 * have to do various tests here. This does rely on constructing
 * the query in the tests in the correct form, ie. we will not
 * notice that an "OR" ConstraintSet with one SimpleConstraint in
 * it is the same as a SimpleConstraint.
 */
public static void assertEquals(String msg, Query q1, Query q2) {
  if ((q1 != null) && (q2 != null)) {
    msg += ": expected <" + q1.toString() + "> but was <" + q2.toString() + ">";
    //msg += ": q1 = " + q1.toString() + ", q2 = " + q2.toString();
    // Are the SELECT lists equal?
    checkQueryClassLists(msg + ": SELECT lists are not equal", q1.getSelect(), q2.getSelect(), q1, q2);
    // Are the FROM lists equal?
    checkQueryClassLists(msg + ": FROM lists are not equal", q1.getFrom(), q2.getFrom(), q1, q2);
    // Are the constraints equal?
    checkConstraints(msg + ": CONSTRAINTS not the same", q1.getConstraint(), q2.getConstraint(), q1, q2);
    // Are the ORDER BY lists equal?
    checkQueryClassLists(msg + ": ORDER BY lists are not equal", q1.getOrderBy(), q2.getOrderBy(), q1, q2);
    Assert.assertEquals(msg + ": LIMIT is the not the same", q1.getLimit(), q2.getLimit());
    // Do the toString methods return the same thing?
    checkToString(msg + ": toString does not return the same String", q1, q2);
  } else if ((q1 == null) && (q2 == null)) {
    // They are equal - albeit null.
  } else {
    Assert.assertNotNull(msg + ": q1 is null, while q2 is not null", q1);
    Assert.fail(msg + ": q2 is null, while q1 is not null");
  }
}

相关文章