Examples of DBJoinExpr


Examples of org.apache.empire.db.expr.join.DBJoinExpr

//          for (int i=0;i<joins.size();i++)
//               buf.append("(");
            for (int i=0;i<joins.size();i++)
            {    // Joins zusammenbauen
                 long context;
                 DBJoinExpr join = joins.get(i);
                 if (i<1)
                 {   // Add Join Tables
                     joinTables.add(join.getLeft() .getUpdateColumn().getRowSet());
                     joinTables.add(join.getRight().getUpdateColumn().getRowSet());
                     // Remove from List
                     tables.remove(join.getLeft() .getUpdateColumn().getRowSet());
                     tables.remove(join.getRight().getUpdateColumn().getRowSet());
                     // Context
                     context = CTX_NAME|CTX_VALUE;
                 }
                 else
                 {   // Extend the join                   
                     if ( joinTables.contains(join.getRight().getUpdateColumn().getRowSet()))
                          join.reverse();
                     // Add Right Table    
                     joinTables.add(join.getRight().getUpdateColumn().getRowSet());
                     tables .remove(join.getRight().getUpdateColumn().getRowSet());
                     // Context
                     context = CTX_VALUE;
                     buf.append( "\t" );
                 }
                 join.addSQL(buf, context);
//               buf.append(")");
                 if( i!=joins.size()-1 )
                     buf.append("\r\n");
            }
            sep = true;
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

            if (upd.set == null)
                continue; // nothing to do for this table!
            // Evaluate Joins
            for (i = 0; cmd.joins != null && i < cmd.joins.size(); i++)
            {
                DBJoinExpr join = cmd.joins.get(i);
                DBColumn left  = join.getLeft() .getUpdateColumn();
                DBColumn right = join.getRight().getUpdateColumn();
                if (left.getRowSet()==table && table.isKeyColumn(left))
                    if (!addJoinRestriction(upd, left, right, keyColumns, rec))
                        return error(Errors.ItemNotFound, left.getFullName());
                if (right.getRowSet()==table && table.isKeyColumn(right))
                    if (!addJoinRestriction(upd, right, left, keyColumns, rec))
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

            if (upd.set == null)
                continue; // nothing to do for this table!
            // Evaluate Joins
            for (i = 0; cmd.joins != null && i < cmd.joins.size(); i++)
            {
                DBJoinExpr join = cmd.joins.get(i);
                DBColumn left  = join.getLeft() .getUpdateColumn();
                DBColumn right = join.getRight().getUpdateColumn();
                if (left.getRowSet()==table && table.isKeyColumn(left))
                    if (!addJoinRestriction(upd, left, right, keyColumns, rec))
                        throw new ItemNotFoundException(left.getFullName());
                if (right.getRowSet()==table && table.isKeyColumn(right))
                    if (!addJoinRestriction(upd, right, left, keyColumns, rec))
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

            if (upd.set == null)
                continue; // nothing to do for this table!
            // Evaluate Joins
            for (i = 0; cmd.joins != null && i < cmd.joins.size(); i++)
            {
                DBJoinExpr join = cmd.joins.get(i);
                DBColumn left  = join.getLeft() .getUpdateColumn();
                DBColumn right = join.getRight().getUpdateColumn();
                if (left.getRowSet()==table && table.isKeyColumn(left))
                    if (!addJoinRestriction(upd, left, right, keyColumns, rec))
                        return error(Errors.ItemNotFound, left.getFullName());
                if (right.getRowSet()==table && table.isKeyColumn(right))
                    if (!addJoinRestriction(upd, right, left, keyColumns, rec))
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

        if (joins == null)
            joins = new ArrayList<DBJoinExpr>();
        // Create a new join
        for (int i = 0; i < joins.size(); i++)
        { // Check whether join exists
            DBJoinExpr item = joins.get(i);
            if (item.equals(join))
                return;
        }
        joins.add(join);
    }
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

     *
     * @return the join expression
     */
    public DBJoinExpr join(DBColumnExpr left, DBColumn right, DBJoinType joinType)
    {
        DBJoinExpr join = new DBJoinExpr(left, right, joinType);
        join(join);
        return join;
    }
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

     *
     * @return the join expresion
     */
    public DBJoinExpr join(DBRowSet rowset, DBCompareExpr cmp, DBJoinType joinType)
    {
        DBJoinExpr join = new DBJoinExprEx(rowset, cmp, joinType);
        join(join);
        return join;
    }
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

//          for (int i=0;i<joins.size();i++)
//               buf.append("(");
            for (int i=0;i<joins.size();i++)
            {    // Joins zusammenbauen
                 long context;
                 DBJoinExpr join = joins.get(i);
                 if (i<1)
                 {   // Add Join Tables
                     joinTables.add(join.getLeft() .getUpdateColumn().getRowSet());
                     joinTables.add(join.getRight().getUpdateColumn().getRowSet());
                     // Remove from List
                     tables.remove(join.getLeft() .getUpdateColumn().getRowSet());
                     tables.remove(join.getRight().getUpdateColumn().getRowSet());
                     // Context
                     context = CTX_NAME|CTX_VALUE;
                 }
                 else
                 {   // Extend the join                   
                     if ( joinTables.contains(join.getRight().getUpdateColumn().getRowSet()))
                          join.reverse();
                     // Add Right Table    
                     joinTables.add(join.getRight().getUpdateColumn().getRowSet());
                     tables .remove(join.getRight().getUpdateColumn().getRowSet());
                     // Context
                     context = CTX_VALUE;
                     buf.append( "\t" );
                 }
                 join.addSQL(buf, context);
//               buf.append(")");
                 if( i!=joins.size()-1 )
                     buf.append("\r\n");
            }
            sep = true;
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

        if (joins == null)
            joins = new ArrayList<DBJoinExpr>();
        // Create a new join
        for (int i = 0; i < joins.size(); i++)
        { // Check whether join exists
            DBJoinExpr item = joins.get(i);
            if (item.equals(join))
                return;
        }
        joins.add(join);
    }
View Full Code Here

Examples of org.apache.empire.db.expr.join.DBJoinExpr

     *
     * @return the join expression
     */
    public DBJoinExpr join(DBColumnExpr left, DBColumn right, DBJoinType joinType)
    {
        DBJoinExpr join = new DBJoinExpr(left, right, joinType);
        join(join);
        return join;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.