[teiid-commits] teiid SVN: r2538 - in branches/7.1.x/connectors: translator-salesforce/src/main/java/org/teiid/translator/salesforce and 2 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Sep 7 18:36:08 EDT 2010


Author: rareddy
Date: 2010-09-07 18:36:07 -0400 (Tue, 07 Sep 2010)
New Revision: 2538

Removed:
   branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java
Modified:
   branches/7.1.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
   branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java
   branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
   branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
   branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
Log:
TEIID-1027: Removing the Messages class. use SalesForcePlugin instead.

Modified: branches/7.1.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
===================================================================
--- branches/7.1.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -33,7 +33,6 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.resource.spi.BasicConnection;
-import org.teiid.translator.salesforce.Messages;
 import org.teiid.translator.salesforce.SalesforceConnection;
 import org.teiid.translator.salesforce.execution.DataPayload;
 import org.teiid.translator.salesforce.execution.DeletedObject;
@@ -115,7 +114,7 @@
 			} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
 				throw new ResourceException(e.getCause().getMessage());
 			}
-			LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Login was successful for username " + username);
+			LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Login was successful for username " + username); //$NON-NLS-1$
 
 			sh = new SessionHeader();
 			sh.setSessionId(loginResult.getSessionId());
@@ -156,7 +155,7 @@
 		
 		if(batchSize > 2000) {
 			batchSize = 2000;
-			LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.reduced.batch.size")); //$NON-NLS-1$
+			LogManager.logDetail(LogConstants.CTX_CONNECTOR, "reduced.batch.size"); //$NON-NLS-1$
 		}
 		
 		QueryResult qr = null;
@@ -216,7 +215,7 @@
 			DeleteResult result = results.get(i);
 			if(!result.isSuccess()) {
 				if(allGood) {
-					errorMessages.append("Error(s) executing DELETE: ");
+					errorMessages.append("Error(s) executing DELETE: "); //$NON-NLS-1$
 					allGood = false;
 				}
 				List<com.sforce.soap.partner.Error> errors = result.getErrors();

Deleted: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.salesforce;
-
-import java.util.MissingResourceException;
-
-import org.teiid.core.BundleUtil;
-
-public class Messages {
-	
-	private static final BundleUtil RESOURCE_BUNDLE = BundleUtil.getBundleUtil(Messages.class);
-
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}

Modified: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -30,9 +30,9 @@
 public class Util {
 
 	public static String stripQutes(String id) {
-		if((id.startsWith("'") && id.endsWith("'"))) {
+		if((id.startsWith("'") && id.endsWith("'"))) { //$NON-NLS-1$ //$NON-NLS-2$
 			id = id.substring(1,id.length()-1);
-		} else if ((id.startsWith("\"") && id.endsWith("\""))) {
+		} else if ((id.startsWith("\"") && id.endsWith("\""))) { //$NON-NLS-1$ //$NON-NLS-2$
 			id = id.substring(1,id.length()-1);
 		}
 		return id;
@@ -40,11 +40,11 @@
 	
 	public static String addSingleQuotes(String text) {
 		StringBuffer result = new StringBuffer();
-		if(!text.startsWith("'")) {
+		if(!text.startsWith("'")) { //$NON-NLS-1$
 			result.append('\'');
 		}
 		result.append(text);
-		if(!text.endsWith("'")) {
+		if(!text.endsWith("'")) { //$NON-NLS-1$
 			result.append('\'');
 		} 
 		return result.toString();
@@ -52,20 +52,20 @@
 	
 	public static void validateQueryLength(StringBuffer query) throws TranslatorException {
 		if(query.length() >= 10000) {
-			throw new TranslatorException(Messages.getString("Util.query.exceeds.max.length"));
+			throw new TranslatorException(SalesForcePlugin.Util.getString("Util.query.exceeds.max.length")); //$NON-NLS-1$
 		}
 	}
 
 	public static SimpleDateFormat getSalesforceDateTimeFormat() {
-			return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+			return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); //$NON-NLS-1$
 	}
 	
 	public static SimpleDateFormat getTimeZoneOffsetFormat() {
-		return new SimpleDateFormat("Z");
+		return new SimpleDateFormat("Z"); //$NON-NLS-1$
 	}
 
 	public static DateFormat getSalesforceDateFormat() {
-		return new SimpleDateFormat("yyyy-MM-dd");
+		return new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
 	}
 	
 }

Modified: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -49,7 +49,7 @@
 import org.teiid.translator.ExecutionContext;
 import org.teiid.translator.ResultSetExecution;
 import org.teiid.translator.TranslatorException;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
 import org.teiid.translator.salesforce.SalesforceConnection;
 import org.teiid.translator.salesforce.Util;
 import org.teiid.translator.salesforce.execution.visitors.JoinQueryVisitor;
@@ -104,11 +104,11 @@
 	}
 
 	public void cancel() throws TranslatorException {
-		LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.cancel"));//$NON-NLS-1$
+		LogManager.logDetail(LogConstants.CTX_CONNECTOR, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.cancel"));//$NON-NLS-1$
 	}
 
 	public void close() {
-		LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.close")); //$NON-NLS-1$
+		LogManager.logDetail(LogConstants.CTX_CONNECTOR, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.close")); //$NON-NLS-1$
 	}
 
 	@Override
@@ -248,7 +248,7 @@
 						if (element.getNameInSource().equalsIgnoreCase("id")) { //$NON-NLS-1$
 							setValueInColumn(j, sObject.getId(), result);
 						} else {
-							throw new TranslatorException(Messages.getString("SalesforceQueryExecutionImpl.missing.field")+ element.getNameInSource()); //$NON-NLS-1$
+							throw new TranslatorException(SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.missing.field")+ element.getNameInSource()); //$NON-NLS-1$
 						}
 					} else {
 						Object cell;
@@ -305,7 +305,7 @@
 	@SuppressWarnings("unchecked")
 	private Object getCellDatum(Column element, Element elem) throws TranslatorException {
 		if(!element.getNameInSource().equals(elem.getLocalName())) {
-			throw new TranslatorException(Messages.getString("SalesforceQueryExecutionImpl.column.mismatch1") + element.getNameInSource() + Messages.getString("SalesforceQueryExecutionImpl.column.mismatch2") + elem.getLocalName()); //$NON-NLS-1$ //$NON-NLS-2$
+			throw new TranslatorException(SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.column.mismatch1") + element.getNameInSource() + SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.column.mismatch2") + elem.getLocalName()); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		String value = elem.getTextContent();
 		Object result = null;
@@ -318,37 +318,31 @@
 			result = Boolean.valueOf(value);
 		} else if (type.equals(Double.class)) {
 			if (null != value) {
-				if(value.isEmpty()) {
-					result = null;
-				} else {
+				if(!value.isEmpty()) {
 					result = Double.valueOf(value);
 				}
 			}
 		} else if (type.equals(Integer.class)) {
 			if (null != value) {
-				if(value.isEmpty()) {
-					result = null;
-				} else {
+				if(!value.isEmpty()) {
 					result = Integer.valueOf(value);
 				}
 			}
 		} else if (type.equals(java.sql.Date.class)) {
 			if (null != value) {
-				if(value.isEmpty()) {
-					result = null;
-				} else {
+				if(!value.isEmpty()) {
 					result = java.sql.Date.valueOf(value);
 				}
 			}
 		} else if (type.equals(java.sql.Timestamp.class)) {
 			if (null != value) {
-				if(value.isEmpty()) {
-					result = null;
-				} else try {
-					Date date = Util.getSalesforceDateTimeFormat().parse(value);
-					result = new Timestamp(date.getTime());
-				} catch (ParseException e) {
-					throw new TranslatorException(e, Messages.getString("SalesforceQueryExecutionImpl.datatime.parse") + value); //$NON-NLS-1$
+				if(!value.isEmpty()) { 
+					try {
+						Date date = Util.getSalesforceDateTimeFormat().parse(value);
+						result = new Timestamp(date.getTime());
+					} catch (ParseException e) {
+						throw new TranslatorException(e, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.datatime.parse") + value); //$NON-NLS-1$
+					}
 				}
 			}
 		} else {

Modified: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -45,7 +45,7 @@
 import org.teiid.metadata.RuntimeMetadata;
 import org.teiid.metadata.Table;
 import org.teiid.translator.TranslatorException;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
 import org.teiid.translator.salesforce.Util;
 
 
@@ -54,21 +54,21 @@
  */
 public abstract class CriteriaVisitor extends HierarchyVisitor implements ICriteriaVisitor {
 
-    private static final String RESTRICTEDMULTISELECTPICKLIST = "restrictedmultiselectpicklist";
-	private static final String MULTIPICKLIST = "multipicklist";
-	protected static final String SELECT = "SELECT";
-    protected static final String FROM = "FROM";
-    protected static final String WHERE = "WHERE";
-    protected static final String ORDER_BY = "ORDER BY";
-    protected static final String LIMIT = "LIMIT";
-    protected static final String SPACE = " ";
-    protected static final String EXCLUDES = "EXCLUDES";
-    protected static final String INCLUDES = "includes";
-    protected static final String COMMA = ",";
-    protected static final String SEMI = ";";
-    protected static final String APOS = "'";
-    protected static final String OPEN = "(";
-    protected static final String CLOSE = ")";
+    private static final String RESTRICTEDMULTISELECTPICKLIST = "restrictedmultiselectpicklist"; //$NON-NLS-1$
+	private static final String MULTIPICKLIST = "multipicklist"; //$NON-NLS-1$
+	protected static final String SELECT = "SELECT"; //$NON-NLS-1$
+    protected static final String FROM = "FROM"; //$NON-NLS-1$
+    protected static final String WHERE = "WHERE"; //$NON-NLS-1$
+    protected static final String ORDER_BY = "ORDER BY"; //$NON-NLS-1$
+    protected static final String LIMIT = "LIMIT"; //$NON-NLS-1$
+    protected static final String SPACE = " "; //$NON-NLS-1$
+    protected static final String EXCLUDES = "EXCLUDES"; //$NON-NLS-1$
+    protected static final String INCLUDES = "includes"; //$NON-NLS-1$
+    protected static final String COMMA = ","; //$NON-NLS-1$
+    protected static final String SEMI = ";"; //$NON-NLS-1$
+    protected static final String APOS = "'"; //$NON-NLS-1$
+    protected static final String OPEN = "("; //$NON-NLS-1$
+    protected static final String CLOSE = ")"; //$NON-NLS-1$
 
     protected RuntimeMetadata metadata;
     private HashMap<Comparison.Operator, String> comparisonOperators;
@@ -87,12 +87,12 @@
     public CriteriaVisitor( RuntimeMetadata metadata ) {
         this.metadata = metadata;
         comparisonOperators = new HashMap<Comparison.Operator, String>();
-        comparisonOperators.put(Operator.EQ, "=");
-        comparisonOperators.put(Operator.GE, ">=");
-        comparisonOperators.put(Operator.GT, ">");
-        comparisonOperators.put(Operator.LE, "<=");
-        comparisonOperators.put(Operator.LT, "<");
-        comparisonOperators.put(Operator.NE, "!=");
+        comparisonOperators.put(Operator.EQ, "="); //$NON-NLS-1$
+        comparisonOperators.put(Operator.GE, ">="); //$NON-NLS-1$
+        comparisonOperators.put(Operator.GT, ">"); //$NON-NLS-1$
+        comparisonOperators.put(Operator.LE, "<="); //$NON-NLS-1$
+        comparisonOperators.put(Operator.LT, "<"); //$NON-NLS-1$
+        comparisonOperators.put(Operator.NE, "!="); //$NON-NLS-1$
     }
 
     @Override
@@ -111,12 +111,11 @@
     public void visit( Like criteria ) {
         try {
             if (isIdColumn(criteria.getLeftExpression())) {
-                TranslatorException e = new TranslatorException(Messages.getString("CriteriaVisitor.LIKE.not.supported.on.Id"));
+                TranslatorException e = new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.LIKE.not.supported.on.Id")); //$NON-NLS-1$
                 exceptions.add(e);
             }
             if (isMultiSelectColumn(criteria.getLeftExpression())) {
-                TranslatorException e = new TranslatorException(
-                                                              Messages.getString("CriteriaVisitor.LIKE.not.supported.on.multiselect"));
+                TranslatorException e = new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.LIKE.not.supported.on.multiselect")); //$NON-NLS-1$
                 exceptions.add(e);
             }
         } catch (TranslatorException e) {
@@ -187,9 +186,9 @@
     public void parseFunction( Function func ) {
         String functionName = func.getName();
         try {
-            if (functionName.equalsIgnoreCase("includes")) {
+            if (functionName.equalsIgnoreCase("includes")) { //$NON-NLS-1$
                 generateMultiSelect(func, INCLUDES);
-            } else if (functionName.equalsIgnoreCase("excludes")) {
+            } else if (functionName.equalsIgnoreCase("excludes")) { //$NON-NLS-1$
                 generateMultiSelect(func, EXCLUDES);
             }
         } catch (TranslatorException e) {
@@ -238,13 +237,13 @@
 
     private void validateFunction( List<Expression> expressions ) throws TranslatorException {
         if (expressions.size() != 2) {
-            throw new TranslatorException(Messages.getString("CriteriaVisitor.invalid.arg.count"));
+            throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.invalid.arg.count")); //$NON-NLS-1$
         }
         if (!(expressions.get(0) instanceof ColumnReference)) {
-            throw new TranslatorException(Messages.getString("CriteriaVisitor.function.not.column.arg"));
+            throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.function.not.column.arg")); //$NON-NLS-1$
         }
         if (!(expressions.get(1) instanceof Literal)) {
-            throw new TranslatorException(Messages.getString("CriteriaVisitor.function.not.literal.arg"));
+            throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.function.not.literal.arg")); //$NON-NLS-1$
         }
     }
 
@@ -253,7 +252,7 @@
         criterion.append(OPEN);
         boolean first = true;
         String fullParam = param.toString();
-        String[] params = fullParam.split(",");
+        String[] params = fullParam.split(","); //$NON-NLS-1$
         for (int i = 0; i < params.length; i++) {
             String token = params[i];
             if (first) {
@@ -309,7 +308,7 @@
 
             criteriaList.add(queryString.toString());
 
-            if (columnName.equals("IsDeleted")) {
+            if (columnName.equals("IsDeleted")) { //$NON-NLS-1$
                 Literal isDeletedLiteral = (Literal)compCriteria.getRightExpression();
                 Boolean isDeleted = (Boolean)isDeletedLiteral.getValue();
                 if (isDeleted) {
@@ -328,9 +327,9 @@
         queryString.append(getValue(leftExp));
         queryString.append(' ');
         if (criteria.isNegated()) {
-            queryString.append("NOT ");
+            queryString.append("NOT "); //$NON-NLS-1$
         }
-        queryString.append("IN");
+        queryString.append("IN"); //$NON-NLS-1$
         queryString.append('(');
         Column column = ((ColumnReference)criteria.getLeftExpression()).getMetadataObject();
         boolean timeColumn = isTimeColumn(column);
@@ -366,17 +365,16 @@
             Literal literal = (Literal)expr;
             result = literal.getValue().toString();
         } else {
-            throw new RuntimeException("unknown type in SalesforceQueryExecution.getValue(): " + expr.toString());
+            throw new RuntimeException("unknown type in SalesforceQueryExecution.getValue(): " + expr.toString()); //$NON-NLS-1$
         }
         return result;
     }
 
     protected void loadColumnMetadata( NamedTable group ) throws TranslatorException {
         table = group.getMetadataObject();
-        String supportsQuery = table.getProperties().get("Supports Query");
+        String supportsQuery = table.getProperties().get("Supports Query"); //$NON-NLS-1$
         if (!Boolean.valueOf(supportsQuery)) {
-            throw new TranslatorException(table.getNameInSource() + " "
-                                         + Messages.getString("CriteriaVisitor.query.not.supported"));
+            throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         List<Column> columnIds = table.getColumns();
         for (Column element : columnIds) {
@@ -384,7 +382,7 @@
             columnElementsByName.put(name, element);
 
             // influences queryAll behavior
-            if (element.getNameInSource().equals("IsDeleted")) {
+            if (element.getNameInSource().equals("IsDeleted")) { //$NON-NLS-1$
                 String isDeleted = element.getDefaultValue();
                 if (Boolean.parseBoolean(isDeleted)) {
                     this.queryAll = true;
@@ -398,7 +396,7 @@
         if (expression instanceof ColumnReference) {
             Column element = ((ColumnReference)expression).getMetadataObject();
             String nameInSource = element.getNameInSource();
-            if (nameInSource.equalsIgnoreCase("id")) {
+            if (nameInSource.equalsIgnoreCase("id")) { //$NON-NLS-1$
                 result = true;
             }
         }

Modified: branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
===================================================================
--- branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java	2010-09-07 22:20:04 UTC (rev 2537)
+++ branches/7.1.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java	2010-09-07 22:36:07 UTC (rev 2538)
@@ -40,7 +40,7 @@
 import org.teiid.metadata.Table;
 import org.teiid.translator.TranslatorException;
 import org.teiid.translator.salesforce.Constants;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
 import org.teiid.translator.salesforce.Util;
 
 
@@ -61,8 +61,7 @@
 	public void visit(Select query) {
 		super.visit(query);
 		if (query.isDistinct()) {
-			exceptions.add(new TranslatorException(
-					Messages.getString("SelectVisitor.distinct.not.supported")));
+			exceptions.add(new TranslatorException(SalesForcePlugin.Util.getString("SelectVisitor.distinct.not.supported")));
 		}
 		selectSymbols = query.getDerivedColumns();
 		selectSymbolCount = selectSymbols.size();
@@ -78,9 +77,7 @@
 				selectSymbolNameToIndex .put(element.getNameInSource(), index);
 				String nameInSource = element.getNameInSource();
 				if (null == nameInSource || nameInSource.length() == 0) {
-					exceptions.add(new TranslatorException(
-							"name in source is null or empty for column "
-									+ symbol.toString()));
+					exceptions.add(new TranslatorException("name in source is null or empty for column "+ symbol.toString()));
 					continue;
 				}
 				if (nameInSource.equalsIgnoreCase("id")) {
@@ -98,8 +95,7 @@
 	        String supportsQuery = table.getProperties().get(Constants.SUPPORTS_QUERY);
 	        objectSupportsRetrieve = Boolean.valueOf(table.getProperties().get(Constants.SUPPORTS_RETRIEVE));
 	        if (!Boolean.valueOf(supportsQuery)) {
-	            throw new TranslatorException(table.getNameInSource() + " "
-	                                         + Messages.getString("CriteriaVisitor.query.not.supported"));
+	            throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported"));
 	        }
 			loadColumnMetadata(obj);
 		} catch (TranslatorException ce) {



More information about the teiid-commits mailing list