Package org.apache.ws.jaxme.sqls

Examples of org.apache.ws.jaxme.sqls.ColumnReference


      }
      return newColumnReference(column);
  }

  public ColumnReference newColumnReference(Column pColumn) {
      ColumnReference columnReference = new ColumnReferenceImpl(this, pColumn);
      columnReferences.add(columnReference);
      return columnReference;
  }
View Full Code Here


      for (Iterator iter = source.getParts();  iter.hasNext()) {
        Object o = iter.next();
        if (o instanceof Value) {
          target.addPart((Value) o);
        } else if (o instanceof ColumnReference) {
           ColumnReference colRef = (ColumnReference) o;
           TableReference tableRef = (TableReference) pMap.get(colRef.getTableReference());
           if (tableRef == null) {
             throw new IllegalStateException("Unknown reference to table " + colRef.getTableReference().getTable().getQName());
           }
           target.addPart(tableRef.newColumnReference(colRef.getColumn()));
        } else {
           throw new IllegalStateException("Unknown part type: " + o.getClass().getName());
        }
      }
    } else {
View Full Code Here

   public boolean equals(Object o) {
      if (o == null  ||  !(o instanceof ColumnReference)) {
         return false;
      }
      ColumnReference ref = (ColumnReference) o;
      return ref.getTableReference().equals(getTableReference())  &&
             ref.getColumn().equals(getColumn());
   }
View Full Code Here

      if (!columnIter.hasNext()) {
         sb.append(" *");
      } else {
         boolean first = true;
         do {
            ColumnReference column = (ColumnReference) columnIter.next();
            if (first) {
               sb.append(" ");
               first = false;
            } else {
               sb.append(", ");
View Full Code Here

   public boolean equals(Object o) {
      if (o == null  ||  !(o instanceof ColumnReference)) {
         return false;
      }
      ColumnReference ref = (ColumnReference) o;
      return ref.getTableReference().equals(getTableReference())  &&
             ref.getColumn().equals(getColumn());
   }
View Full Code Here

      }
      return newColumnReference(column);
  }

  public ColumnReference newColumnReference(Column pColumn) {
      ColumnReference columnReference = new ColumnReferenceImpl(this, pColumn);
      columnReferences.add(columnReference);
      return columnReference;
  }
View Full Code Here

    }

    public Iterator getColumns() {
        List result = new ArrayList();
        for (Iterator iter = stmt.getResultColumns();  iter.hasNext()) {
            ColumnReference col = (ColumnReference) iter.next();
            result.add(new ViewColumnImpl(col));
        }
        return result.iterator();
    }
View Full Code Here

    public Column getColumn(Column.Name pName) {
        if (pName == null) {
            throw new NullPointerException("Column names must not be null.");
         }
        for (Iterator iter = stmt.getResultColumns();  iter.hasNext()) {
            ColumnReference col = (ColumnReference) iter.next();
            Column.Name alias = col.getAlias();
            if (alias == null) {
              alias = col.getColumn().getName();
            }
            if (alias.equals(pName)) {
                return new ViewColumnImpl(col);
            }
        }
View Full Code Here

            for (Iterator iter = source.getParts();  iter.hasNext()) {
                Object o = iter.next();
                if (o instanceof Value) {
                    target.addPart((Value) o);
                } else if (o instanceof ColumnReference) {
                    ColumnReference colRef = (ColumnReference) o;
                    TableReference tableRef = (TableReference) pMap.get(colRef.getTableReference());
                    if (tableRef == null) {
                        throw new IllegalStateException("Unknown reference to table " + colRef.getTableReference().getTable().getQName());
                    }
                    target.addPart(tableRef.newColumnReference(colRef.getColumn()));
                } else {
                    throw new IllegalStateException("Unknown part type: " + o.getClass().getName());
                }
            }
        } else {
View Full Code Here

        if (!columnIter.hasNext()) {
            sb.append(" *");
        } else {
            boolean first = true;
            do {
                ColumnReference column = (ColumnReference) columnIter.next();
                if (first) {
                    sb.append(" ");
                    first = false;
                } else {
                    sb.append(", ");
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.sqls.ColumnReference

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.