Examples of newColumnReference()


Examples of org.apache.ws.jaxme.sqls.ObjectFactory.newColumnReference()

       
        for (Iterator iter = pKey.getColumnLinks();  iter.hasNext()) {
            ForeignKey.ColumnLink columnReference = (ForeignKey.ColumnLink) iter.next();
            BooleanConstraint eq = createEQ();
            ObjectFactory of = getConstrainedStatement().getSQLFactory().getObjectFactory();
            eq.addPart(of.newColumnReference(pReferencingTable, columnReference.getLocalColumn()));
            eq.addPart(of.newColumnReference(pReferencedTable, columnReference.getReferencedColumn()));
        }
    }
   
    public void addJoin(TableReference pReferencingTable,
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.ObjectFactory.newColumnReference()

        for (Iterator iter = pKey.getColumnLinks();  iter.hasNext()) {
            ForeignKey.ColumnLink columnReference = (ForeignKey.ColumnLink) iter.next();
            BooleanConstraint eq = createEQ();
            ObjectFactory of = getConstrainedStatement().getSQLFactory().getObjectFactory();
            eq.addPart(of.newColumnReference(pReferencingTable, columnReference.getLocalColumn()));
            eq.addPart(of.newColumnReference(pReferencedTable, columnReference.getReferencedColumn()));
        }
    }
   
    public void addJoin(TableReference pReferencingTable,
            ColumnSet pReferencingColumnSet,
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

     joinReference.getOn().addJoin((ForeignKey) otherTable.getForeignKeys().next(),
                                   refLocal, refRef);
     CombinedConstraint cc = statement.getWhere();
     BooleanConstraint bc = cc.createEQ();
     bc.addPart(tableReference.newColumnReference("MyIndex"));
     bc.addPlaceholder();

     SQLGenerator generator = sqlFactory.newSQLGenerator();
     generator.setLineTerminator("\n");
     String got = generator.getQuery(statement);
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

        Table table = getBasicTable();
        OraSelectStatement selectStatement = (OraSelectStatement) table.getSelectStatement();
        SelectTableReference ref = selectStatement.getSelectTableReference();
        CombinedConstraint startWith = selectStatement.getStartWith();
        BooleanConstraint bc = startWith.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(1);
        CombinedConstraint connectByPrior = selectStatement.getConnectByPrior();
        bc = connectByPrior.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(ref.newColumnReference("MyName"));
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

        BooleanConstraint bc = startWith.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(1);
        CombinedConstraint connectByPrior = selectStatement.getConnectByPrior();
        bc = connectByPrior.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(ref.newColumnReference("MyName"));
        SQLGenerator gen = getSQLGenerator();
        String query = gen.getQuery(selectStatement);
        assertEquals("SELECT MyIndex, MyName, MyDate FROM MySchema.MyTable START WITH MyIndex=1 CONNECT BY PRIOR MyIndex=MyName", query);
    }
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(1);
        CombinedConstraint connectByPrior = selectStatement.getConnectByPrior();
        bc = connectByPrior.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
        bc.addPart(ref.newColumnReference("MyName"));
        SQLGenerator gen = getSQLGenerator();
        String query = gen.getQuery(selectStatement);
        assertEquals("SELECT MyIndex, MyName, MyDate FROM MySchema.MyTable START WITH MyIndex=1 CONNECT BY PRIOR MyIndex=MyName", query);
    }
}
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

       
        joinReference.getOn().addJoin((ForeignKey) otherTable.getForeignKeys().next(),
                refLocal, refRef);
        CombinedConstraint cc = statement.getWhere();
        BooleanConstraint bc = cc.createEQ();
        bc.addPart(tableReference.newColumnReference("MyIndex"));
        bc.addPlaceholder();
        return statement;
    }

    /** <p>Test for a JOIN statement.</p>
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

       
        joinReference.getOn().addJoin((ForeignKey) otherTable.getForeignKeys().next(),
                refLocal, refRef);
        CombinedConstraint cc = statement.getWhere();
        BooleanConstraint bc = cc.createEQ();
        bc.addPart(tableReference.newColumnReference("MyIndex"));
        bc.addPlaceholder();
       
        SQLGenerator generator = getSQLGenerator();
        generator.setLineTerminator("\n");
        String got = generator.getQuery(statement);
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

        SelectStatement statement = table.getSelectStatement();
        SelectTableReference tableReference = statement.getSelectTableReference();
        SelectStatement existsStatement = otherTable.getSelectStatement();
        SelectTableReference existsTableReference = existsStatement.getSelectTableReference();
        BooleanConstraint bc = existsStatement.getWhere().createEQ();
        bc.addPart(existsTableReference.newColumnReference("RefIndex"));
        bc.addPart(tableReference.newColumnReference("MyIndex"));
        statement.getWhere().createEXISTS(existsStatement);
       
        SQLGenerator generator = getSQLGenerator();
        generator.setLineTerminator("\n");
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.SelectTableReference.newColumnReference()

        Table table = getBasicTable();
        SelectStatement selectStatement = table.getSelectStatement();
        SelectTableReference ref = selectStatement.getSelectTableReference();
        CombinedConstraint and = selectStatement.getWhere();
        BooleanConstraint bc = and.createLIKE();
        bc.addPart(ref.newColumnReference("MyName"));
        bc.addPart("%a%");
        CombinedConstraint or = and.createOrConstraint();
        or.setNOT(true);
        bc = or.createEQ();
        bc.addPart(ref.newColumnReference("MyIndex"));
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.