cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r764550 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: access/trans/JoinStack.java access/trans/SelectTranslator.java dba/openbase/OpenBaseJoinStack.java
Date Mon, 13 Apr 2009 18:32:24 GMT
Author: aadamchik
Date: Mon Apr 13 18:32:23 2009
New Revision: 764550

URL: http://svn.apache.org/viewvc?rev=764550&view=rev
Log:
renaming / fixing typos

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/JoinStack.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/SelectTranslator.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseJoinStack.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/JoinStack.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/JoinStack.java?rev=764550&r1=764549&r2=764550&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/JoinStack.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/JoinStack.java
Mon Apr 13 18:32:23 2009
@@ -168,7 +168,7 @@
     /**
      * Append join information to the qualifier - the part after "WHERE".
      */
-    protected void appendQualifier(Appendable out, boolean firstQualifyerElement)
+    protected void appendQualifier(Appendable out, boolean firstQualifierElement)
             throws IOException {
         // nothing as standard join is performed before "WHERE"
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/SelectTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/SelectTranslator.java?rev=764550&r1=764549&r2=764550&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/SelectTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/SelectTranslator.java
Mon Apr 13 18:32:23 2009
@@ -59,7 +59,7 @@
  * SelectTranslator is stateful and thread-unsafe.
  */
 public class SelectTranslator extends QueryAssembler {
-    
+
     protected static final int[] UNSUPPORTED_DISTINCT_TYPES = new int[] {
             Types.BLOB, Types.CLOB, Types.LONGVARBINARY, Types.LONGVARCHAR
     };
@@ -73,16 +73,16 @@
 
         return false;
     }
+
     JoinStack joinStack;
 
-    
     public JoinStack getJoinStack() {
-        if(joinStack==null){
+        if (joinStack == null) {
             joinStack = createJoinStack();
         }
         return joinStack;
     }
-    
+
     List<ColumnDescriptor> resultColumns;
     Map<ObjAttribute, ColumnDescriptor> attributeOverrides;
     Map<ColumnDescriptor, ObjAttribute> defaultAttributesByColumn;
@@ -96,7 +96,7 @@
      */
     boolean forcingDistinct;
 
-    protected JoinStack createJoinStack() {        
+    protected JoinStack createJoinStack() {
         return new JoinStack(getAdapter(), queryMetadata.getDataMap());
     }
 
@@ -106,29 +106,31 @@
      */
     @Override
     public String createSqlString() throws Exception {
-        
-        JoinStack jStack = getJoinStack();
+
+        JoinStack joins = getJoinStack();
         boolean status;
-        if(queryMetadata.getDataMap()!=null && queryMetadata.getDataMap().isQuotingSQLIdentifiers()){

-            status= true;
-        } else {
+        if (queryMetadata.getDataMap() != null
+                && queryMetadata.getDataMap().isQuotingSQLIdentifiers()) {
+            status = true;
+        }
+        else {
             status = false;
         }
 
-        QuotingStrategy strategy =  getAdapter().getQuotingStrategy(status);
+        QuotingStrategy strategy = getAdapter().getQuotingStrategy(status);
         forcingDistinct = false;
-       
+
         // build column list
         this.resultColumns = buildResultColumns();
-        
+
         // build qualifier
         StringBuilder qualifierBuffer = adapter.getQualifierTranslator(this).appendPart(
                 new StringBuilder());
 
-         // build ORDER BY
+        // build ORDER BY
         OrderingTranslator orderingTranslator = new OrderingTranslator(this);
         StringBuilder orderingBuffer = orderingTranslator.appendPart(new StringBuilder());
-        
+
         // assemble
         StringBuilder queryBuf = new StringBuilder();
         queryBuf.append("SELECT ");
@@ -153,8 +155,8 @@
         // convert ColumnDescriptors to column names
         List<String> selectColumnExpList = new ArrayList<String>();
         for (ColumnDescriptor column : resultColumns) {
-            selectColumnExpList.add(
-                        column.getQualifiedColumnNameWithQuoteSqlIdentifiers(strategy));
+            selectColumnExpList.add(column
+                    .getQualifiedColumnNameWithQuoteSqlIdentifiers(strategy));
         }
 
         // append any column expressions used in the order by if this query
@@ -163,34 +165,34 @@
             List<String> orderByColumnList = orderingTranslator.getOrderByColumnList();
             for (String orderByColumnExp : orderByColumnList) {
                 // Convert to ColumnDescriptors??
-                if (!selectColumnExpList.contains(orderByColumnExp)) {                  
 
+                if (!selectColumnExpList.contains(orderByColumnExp)) {
                     selectColumnExpList.add(orderByColumnExp);
                 }
             }
         }
-      
+
         // append columns (unroll the loop's first element)
         int columnCount = selectColumnExpList.size();
         queryBuf.append(selectColumnExpList.get(0));
-        
+
         // assume there is at least 1 element
         for (int i = 1; i < columnCount; i++) {
             queryBuf.append(", ");
-            queryBuf.append(selectColumnExpList.get(i));            
+            queryBuf.append(selectColumnExpList.get(i));
         }
 
         // append from clause
         queryBuf.append(" FROM ");
 
         // append tables and joins
-        jStack.appendRootWithQuoteSqlIdentifiers(queryBuf, getRootDbEntity());
-        
-        jStack.appendJoins(queryBuf);
-        jStack.appendQualifier(qualifierBuffer, qualifierBuffer.length() == 0);
+        joins.appendRootWithQuoteSqlIdentifiers(queryBuf, getRootDbEntity());
+
+        joins.appendJoins(queryBuf);
+        joins.appendQualifier(qualifierBuffer, qualifierBuffer.length() == 0);
 
         // append qualifier
         if (qualifierBuffer.length() > 0) {
-            queryBuf.append(" WHERE ");            
+            queryBuf.append(" WHERE ");
             queryBuf.append(qualifierBuffer);
         }
 
@@ -618,7 +620,7 @@
      */
     @Override
     public void resetJoinStack() {
-        getJoinStack().resetStack();           
+        getJoinStack().resetStack();
     }
 
     /**
@@ -643,4 +645,4 @@
     public boolean supportsTableAliases() {
         return true;
     }
- }
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseJoinStack.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseJoinStack.java?rev=764550&r1=764549&r2=764550&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseJoinStack.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/openbase/OpenBaseJoinStack.java
Mon Apr 13 18:32:23 2009
@@ -60,8 +60,8 @@
     }
 
     @Override
-    protected void appendQualifier(Appendable out, boolean firstQualifyerElement) throws
IOException {
-        boolean first = firstQualifyerElement;
+    protected void appendQualifier(Appendable out, boolean firstQualifierElement) throws
IOException {
+        boolean first = firstQualifierElement;
         for (JoinTreeNode node : rootNode.getChildren()) {
             if (!first) {
                 out.append(" AND ");



Mime
View raw message