Package com.caucho.amber.query

Examples of com.caucho.amber.query.FromItem


  {
    if (_fromItem == from)
      return true;

    for (int i = 0; i < _subItems.size(); i++) {
      FromItem subItem = _subItems.get(i);

      if (from == subItem)
        return true;
    }
View Full Code Here


    }

    if (! fullSelect)
      return;

    FromItem item = _fromItem;

    // jpa/0l4b
    if (_rootItem != null) {
      EntityType parentType = (EntityType) type;

      while (parentType.getParentType() != null
             && parentType.getParentType() instanceof EntityType) {
        parentType = parentType.getParentType();
      }

      item = _rootItem;
    }

    String valueSelect = "";

    // jpa/0l12, jpa/0l47
    valueSelect = type.generateLoadSelect(item.getTable(),
                                          item.getName());

    if (valueSelect != null && ! "".equals(valueSelect)) {
      cb.append(", ");
      cb.append(valueSelect);
    }

    for (int i = 0; i < _subItems.size(); i++) {
      item = _subItems.get(i);

      valueSelect = type.generateLoadSelect(item.getTable(), item.getName());

      if (! valueSelect.equals("")) {
        cb.append(", ");
        cb.append(valueSelect);
      }
View Full Code Here

  public FromItem addFromItem(QueryParser parser, String id)
    throws QueryParseException
  {
    _expr.bindSelect(parser, id);

    FromItem fromItem = _expr.getChildFromItem();

    return fromItem;
  }
View Full Code Here

    if (_parent instanceof ManyToOneExpr) {
      // jpa/0h1c
      return false;
    }

    FromItem fromItem = _parent.getChildFromItem();

    // ejb/0j00 vs ejb/0h13 vs ejb/0t00
    if (type == IS_INNER_JOIN)
      return (from == fromItem);
    else
View Full Code Here

   */
  public FromItem addFromItem(QueryParser parser, String id)
    throws QueryParseException
  {
    // jpa/0l12
    FromItem fromItem = parser.addFromItem(getEntityType(),
                                           getEntityType().getTable(),
                                           id);

    return fromItem;
  }
View Full Code Here

  /**
   * Binds the expression as a select item.
   */
  public AmberExpr bindSelect(QueryParser parser)
  {
    FromItem parentFromItem = _parent.bindSubPath(parser);

    if (parentFromItem.getTable() == getColumn().getTable()) {
      _fromItem = parentFromItem;

      return this;
    }

View Full Code Here

    if (_parent instanceof ManyToOneExpr) {
      // jpa/0h1c
      return false;
    }

    FromItem fromItem = _parent.getChildFromItem();

    // ejb/0j00 vs ejb/0h13 vs ejb/0t00
    if (type == IS_INNER_JOIN)
      return (from == fromItem);
    else
View Full Code Here

  public FromItem addFromItem(QueryParser parser, String id)
    throws QueryParseException
  {
    _expr.bindSelect(parser, id);

    FromItem fromItem = _expr.getChildFromItem();

    return fromItem;
  }
View Full Code Here

  public FromItem addFromItem(QueryParser parser, String id)
    throws QueryParseException
  {
    _expr = (DependentEntityOneToOneExpr) _expr.bindSelect(parser, id);

    FromItem fromItem = _expr.bindSubPath(parser);

    return fromItem;
  }
View Full Code Here

  /**
   * Binds the expression as a select item.
   */
  public AmberExpr bindSelect(QueryParser parser)
  {
    FromItem parentFromItem = _parent.bindSubPath(parser);

    if (parentFromItem.getTable() == getColumn().getTable()) {
      _fromItem = parentFromItem;

      return this;
    }

View Full Code Here

TOP

Related Classes of com.caucho.amber.query.FromItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.