Package org.apache.torque

Examples of org.apache.torque.Column


     * as comparison operator in the two-arg or method.
     */
    public void testOrUnaryOperator()
    {
        // prepare
        final Column column = new ColumnImpl("myTable", "myColumn");
        final SqlEnum operator = SqlEnum.ISNOTNULL;

        // execute
        c.or(column, operator);

View Full Code Here


    /**
     * Test where condition with several ANDs compairing against Strings.
     */
    public void testAndString() throws Exception
    {
        final Column column1 = new ColumnImpl("myTable", "myColumn1");
        final Column column2 = new ColumnImpl("myTable", "myColumn2");
        final String value1a = "1a";
        final String value1b = "1b";
        final String value2a = "2a";
        final String value2b = "2b";
        Criteria c = new Criteria().where(column1, value1a)
View Full Code Here

    /**
     * Test where condition with several ANDs compairing against Strings.
     */
    public void testAndString()
    {
        final Column column1 = new ColumnImpl("myTable", "myColumn1");
        final Column column2 = new ColumnImpl("myTable", "myColumn2");
        final String value1a = "1a";
        final String value1b = "1b";
        final String value2a = "2a";
        final String value2b = "2b";

View Full Code Here

    /**
     * Test where condition with several ORs compairing against Strings.
     */
    public void testOrString() throws Exception
    {
        final Column column1 = new ColumnImpl("myTable", "myColumn1");
        final Column column2 = new ColumnImpl("myTable", "myColumn2");
        final String value1a = "1a";
        final String value1b = "1b";
        final String value2a = "2a";
        final String value2b = "2b";
        Criteria c = new Criteria().where(column1, value1a)
View Full Code Here

    /**
     * Test that nesting Criterions works for equals comparison.
     */
    public void testNestedCriterionComparisonEqual() throws TorqueException
    {
        final Column column2 = new ColumnImpl("myTable2", "myColumn2");
        final String value2 = "myValue2";

        final Column column3 = new ColumnImpl("myTable3", "myColumn3");
        final String value3 = "myValue3";

        final Column column4 = new ColumnImpl("myTable4", "myColumn4");
        final String value4 = "myValue4";

        final Column column5 = new ColumnImpl("myTable5", "myColumn5");
        final String value5 = "myValue5";

        Criterion crit2 =
            new Criterion(column2, value2, Criteria.EQUAL);
        Criterion crit3 =
View Full Code Here

     * Test that nesting Criterions works for other comparisons than equal.
     */
    public void testNestedCriterionComparisonLessGreaterThan()
            throws TorqueException
    {
        final Column column2 = new ColumnImpl("myTable2", "myColumn2");
        final String value2 = "myValue2";

        final Column column3 = new ColumnImpl("myTable3", "myColumn3");
        final String value3 = "myValue3";

        final Column column4 = new ColumnImpl("myTable4", "myColumn4");
        final String value4 = "myValue4";

        final Column column5 = new ColumnImpl("myTable5", "myColumn5");
        final String value5 = "myValue5";

        c = new Criteria();
        Criterion crit2 = new Criterion(
                column2,
View Full Code Here

    /**
     * Test where condition with several ANDs compairing against Strings.
     */
    public void testAndCriterions() throws Exception
    {
        final Column column1 = new ColumnImpl("myTable", "myColumn1");
        final Column column2 = new ColumnImpl("myTable", "myColumn2");
        final String value1a = "1a";
        final String value1b = "1b";
        final String value2a = "2a";
        Criterion criterion1 = new Criterion(column1, value1a);
        Criterion criterion2 = new Criterion(column1, value1b);
View Full Code Here

    /**
     * Test where condition with several ORs compairing against Strings.
     */
    public void testOrCriterions() throws Exception
    {
        final Column column1 = new ColumnImpl("myTable", "myColumn1");
        final Column column2 = new ColumnImpl("myTable", "myColumn2");
        final String value1a = "1a";
        final String value1b = "1b";
        final String value2a = "2a";
        Criterion criterion1 = new Criterion(column1, value1a);
        Criterion criterion2 = new Criterion(column1, value1b);
View Full Code Here

TOP

Related Classes of org.apache.torque.Column

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.