You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tv...@apache.org on 2006/10/20 14:20:05 UTC
svn commit: r466087 [3/3] - in
/db/torque/runtime/trunk/src/java/org/apache/torque: ./ adapter/ avalon/
dsfactory/ manager/ map/ oid/ om/ util/
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java Fri Oct 20 05:20:01 2006
@@ -1,7 +1,7 @@
package org.apache.torque.util;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@
{
/** Logging */
protected static final Log log = LogFactory.getLog(SQLBuilder.class);
-
+
/** Function Characters */
public static final String[] COLUMN_CHARS = {".", "*"};
public static final String[] DELIMITERS = {" ", ",", "(", ")", "<", ">"};
@@ -143,7 +143,7 @@
}
if (dotIndex == -1)
{
- throw new TorqueException("removeSQLFunction() : Column name "
+ throw new TorqueException("removeSQLFunction() : Column name "
+ name
+ " does not contain a . or a *");
}
@@ -224,14 +224,14 @@
HashSet tables = new HashSet();
// Loop over all the Criterions
- for (Iterator it = crit.keySet().iterator(); it.hasNext(); )
+ for (Iterator it = crit.keySet().iterator(); it.hasNext();)
{
String key = (String) it.next();
Criteria.Criterion c = crit.getCriterion(key);
List tableNames = c.getAllTables();
// Loop over all Tables referenced in this criterion.
- for (Iterator it2 = tableNames.iterator(); it2.hasNext(); )
+ for (Iterator it2 = tableNames.iterator(); it2.hasNext();)
{
String name = (String) it2.next();
String aliasName = crit.getTableForAlias(name);
@@ -303,7 +303,7 @@
* @param query the query to which the select columns should be added
* @throws TorqueException if the select columns can not be processed
*/
- private static final void processSelectColumns(
+ private static void processSelectColumns(
final Criteria criteria,
final Query query,
final String dbName)
@@ -325,17 +325,17 @@
* @param criteria the criteria from which the As-columns are taken
* @param query the query to which the As-columns should be added
*/
- private static final void processAsColumns(
+ private static void processAsColumns(
final Criteria criteria,
final Query query)
{
UniqueList querySelectClause = query.getSelectClause();
Map criteriaAsColumns = criteria.getAsColumns();
- for (Iterator it = criteriaAsColumns.entrySet().iterator(); it.hasNext(); )
+ for (Iterator it = criteriaAsColumns.entrySet().iterator(); it.hasNext();)
{
- Map.Entry entry = (Map.Entry)it.next();
- String key = (String)entry.getKey();
+ Map.Entry entry = (Map.Entry) it.next();
+ String key = (String) entry.getKey();
querySelectClause.add(
new StringBuffer()
.append(entry.getValue())
@@ -350,7 +350,7 @@
* @param criteria the criteria from which the Modifiers are taken
* @param query the query to which the Modifiers should be added
*/
- private static final void processModifiers(
+ private static void processModifiers(
final Criteria criteria,
final Query query)
{
@@ -370,7 +370,7 @@
* or null if a normal statement should be built.
* @throws TorqueException if the Criterion-objects can not be processed
*/
- private static final void processCriterions(
+ private static void processCriterions(
final DB db,
final DatabaseMap dbMap,
final String dbName,
@@ -382,7 +382,7 @@
{
UniqueList whereClause = query.getWhereClause();
- for (Iterator it = crit.keySet().iterator(); it.hasNext(); )
+ for (Iterator it = crit.keySet().iterator(); it.hasNext();)
{
String key = (String) it.next();
Criteria.Criterion criterion = crit.getCriterion(key);
@@ -426,7 +426,7 @@
* @param query the query to which the OrderBy-Columns should be added
* @throws TorqueException if the OrderBy-Columns can not be processed
*/
- private static final void processOrderBy(
+ private static void processOrderBy(
final DB db,
final DatabaseMap dbMap,
final Criteria crit,
@@ -516,7 +516,7 @@
* @param query the query to which the GroupBy-Columns should be added
* @throws TorqueException if the GroupBy-Columns can not be processed
*/
- private static final void processGroupBy(
+ private static void processGroupBy(
final Criteria crit,
final Query query)
throws TorqueException
@@ -556,7 +556,7 @@
* @param query the query to which the Having-Columns should be added
* @throws TorqueException if the Having-Columns can not be processed
*/
- private static final void processHaving(
+ private static void processHaving(
final Criteria crit,
final Query query)
throws TorqueException
@@ -576,7 +576,7 @@
* @param query the query to which the Limit clause should be added
* @throws TorqueException if the Database adapter cannot be obtained
*/
- private static final void processLimits(
+ private static void processLimits(
final Criteria crit,
final Query query)
throws TorqueException
@@ -650,7 +650,7 @@
if (StringUtils.isNotEmpty(aliasName))
{
// If the tables have an alias, add an "<xxx> <yyy> statement"
- // <xxx> AS <yyy> causes problems on oracle
+ // <xxx> AS <yyy> causes problems on oracle
return new StringBuffer(
tableName.length() + aliasName.length() + 1)
.append(aliasName)
@@ -689,7 +689,7 @@
// true is returned.
return true;
}
- for ( Iterator it = fromClause.iterator(); it.hasNext();)
+ for (Iterator it = fromClause.iterator(); it.hasNext();)
{
Query.FromElement fromElement
= (Query.FromElement) it.next();
@@ -712,7 +712,7 @@
* @return the table in the from clause which represents the
* supplied tableOrAliasName
*/
- private static final String addTableToFromClause(
+ private static String addTableToFromClause(
final String tableName,
final Criteria criteria,
Query query)
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlEnum.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlEnum.java?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlEnum.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlEnum.java Fri Oct 20 05:20:01 2006
@@ -1,7 +1,7 @@
package org.apache.torque.util;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
@@ -114,7 +114,7 @@
return false;
}
- if (! (o instanceof SqlEnum))
+ if (!(o instanceof SqlEnum))
{
return false;
}
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlExpression.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlExpression.java?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlExpression.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/SqlExpression.java Fri Oct 20 05:20:01 2006
@@ -1,7 +1,7 @@
package org.apache.torque.util;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
@@ -258,11 +258,11 @@
else if (criteria instanceof Criteria)
{
Query subquery = SQLBuilder.buildQueryClause(
- (Criteria) criteria,
- null,
+ (Criteria) criteria,
+ null,
new SQLBuilder.QueryCallback() {
public String process(
- Criteria.Criterion criterion,
+ Criteria.Criterion criterion,
List params)
{
return criterion.toString();
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/Transaction.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/Transaction.java?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/Transaction.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/Transaction.java Fri Oct 20 05:20:01 2006
@@ -1,7 +1,7 @@
package org.apache.torque.util;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@
private static Log log = LogFactory.getLog(Transaction.class);
/**
- * Begin a transaction for the default database.
+ * Begin a transaction for the default database.
* This method will fallback gracefully to
* return a normal connection, if the database being accessed does
* not support transactions.
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/VillageUtils.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/VillageUtils.java?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/VillageUtils.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/VillageUtils.java Fri Oct 20 05:20:01 2006
@@ -1,7 +1,7 @@
package org.apache.torque.util;
/*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/package.html
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/package.html?view=diff&rev=466087&r1=466086&r2=466087
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/package.html (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/package.html Fri Oct 20 05:20:01 2006
@@ -1,5 +1,5 @@
<!--
- Copyright 2001-2005 The Apache Software Foundation.
+ Copyright 2001-2006 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org