Package org.apache.torque

Examples of org.apache.torque.Column


        List<JdbcTypedValue> replacementObjects
                = new ArrayList<JdbcTypedValue>();
        for (Map.Entry<Column, JdbcTypedValue> updateValue
                : updateValues.entrySet())
        {
            Column column = updateValue.getKey();
            query.getSelectClause().add(column.getColumnName());
            replacementObjects.add(updateValue.getValue());
        }

        PreparedStatement preparedStatement = null;
        try
View Full Code Here


        List<JdbcTypedValue> replacementObjects
                = new ArrayList<JdbcTypedValue>();
        for (Map.Entry<Column, JdbcTypedValue> updateValue
                : updateValues.entrySet())
        {
            Column column = updateValue.getKey();
            query.getSelectClause().add(column.getColumnName());
            replacementObjects.add(updateValue.getValue());
        }

        PreparedStatement preparedStatement = null;
        try
View Full Code Here

    private void correctBooleans(
                Criteria criteria,
                Criteria.Criterion criterion)
            throws TorqueException
    {
        Column column = criterion.getColumn();
        TableMap tableMapFromCriteria = MapHelper.getTableMap(
                column,
                criteria,
                tableMap);
        // if no description of table available, do not modify anything
        if (tableMapFromCriteria != null)
        {
            String columnName = column.getColumnName();
            ColumnMap columnMap = tableMapFromCriteria.getColumn(columnName);
            if (columnMap != null)
            {
                if ("BOOLEANINT".equals(columnMap.getTorqueType()))
                {
View Full Code Here

     *
     * @return A modified Criteria object.
     */
    public Criteria add(String column, Object value, SqlEnum comparison)
    {
        Column columnImpl = new ColumnImpl(column);
        criterionMap.put(
                columnImpl,
                new Criterion(columnImpl, value, comparison));
        return this;
    }
View Full Code Here

    public Criteria add(String table,
            String column,
            Object value,
            SqlEnum comparison)
    {
        Column columnImpl = new ColumnImpl(table, column);
        criterionMap.put(columnImpl,
                new Criterion(columnImpl, value, comparison));
        return this;
    }
View Full Code Here

        {
            return false;
        }
        for (Iterator<Column> it = criteria.keySet().iterator(); it.hasNext();)
        {
            Column key = it.next();
            if (containsTopLevelColumn(key))
            {
                Criterion a = this.getCriterion(key);
                Criterion b = criteria.getCriterion(key);
                if (!a.equals(b))
View Full Code Here

    /**
     * Test basic where condition on a string.
     */
    public void testWhereString()
    {
        final Column column = new ColumnImpl("myTable", "myColumn");
        final String value = "myValue";

        c.where(column, value);

        // Verify that the Criterion is not composite
View Full Code Here

     * Test basic where condition on a string. The condition is reversed, i.e
     * the String preceeds the column.
     */
    public void testWhereStringReversed()
    {
        final Column column = new ColumnImpl("myTable", "myColumn");
        final String value = "myValue";

        c.where(value, column);

        // Verify that the Criterion is not composite
View Full Code Here

     * Test basic where condition on a string with a non-equal.
     * comparison operator.
     */
    public void testWhereNotEqual()
    {
        final Column column = new ColumnImpl("myTable", "myColumn");
        final String value = "myValue";

        // Add the string
        c.where(column, value, Criteria.NOT_EQUAL);

View Full Code Here

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

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

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.