Author: rareddy
Date: 2010-09-08 13:16:13 -0400 (Wed, 08 Sep 2010)
New Revision: 2546
Removed:
branches/7.1.x/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java
branches/7.1.x/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
branches/7.1.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
branches/7.1.x/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
branches/7.1.x/engine/src/main/java/org/teiid/query/report/ActivityReport.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/util/CommandContext.java
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
Log:
TEIID-1027: Deleting the ErrorMessageKey classes and inline all the constants.
Deleted: branches/7.1.x/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -1,70 +0,0 @@
-package org.teiid.core;
-
-public interface ErrorMessageKeys {
-
- /** types (029) */
- public static final String TYPES_ERR_0001 = "ERR.003.029.0001"; //$NON-NLS-1$
- public static final String TYPES_ERR_0002 = "ERR.003.029.0002"; //$NON-NLS-1$
- public static final String TYPES_ERR_0003 = "ERR.003.029.0003"; //$NON-NLS-1$
- public static final String TYPES_ERR_0004 = "ERR.003.029.0004"; //$NON-NLS-1$
- public static final String TYPES_ERR_0005 = "ERR.003.029.0005"; //$NON-NLS-1$
- public static final String TYPES_ERR_0006 = "ERR.003.029.0006"; //$NON-NLS-1$
- public static final String TYPES_ERR_0007 = "ERR.003.029.0007"; //$NON-NLS-1$
- public static final String TYPES_ERR_0008 = "ERR.003.029.0008"; //$NON-NLS-1$
- public static final String TYPES_ERR_0009 = "ERR.003.029.0009"; //$NON-NLS-1$
- public static final String TYPES_ERR_0010 = "ERR.003.029.0010"; //$NON-NLS-1$
- public static final String TYPES_ERR_0011 = "ERR.003.029.0011"; //$NON-NLS-1$
- public static final String TYPES_ERR_0012 = "ERR.003.029.0012"; //$NON-NLS-1$
- public static final String TYPES_ERR_0013 = "ERR.003.029.0013"; //$NON-NLS-1$
- public static final String TYPES_ERR_0014 = "ERR.003.029.0014"; //$NON-NLS-1$
- public static final String TYPES_ERR_0015 = "ERR.003.029.0015"; //$NON-NLS-1$
- public static final String TYPES_ERR_0016 = "ERR.003.029.0016"; //$NON-NLS-1$
- public static final String TYPES_ERR_0017 = "ERR.003.029.0017"; //$NON-NLS-1$
- public static final String TYPES_ERR_0018 = "ERR.003.029.0018"; //$NON-NLS-1$
- public static final String TYPES_ERR_0019 = "ERR.003.029.0019"; //$NON-NLS-1$
- public static final String TYPES_ERR_0020 = "ERR.003.029.0020"; //$NON-NLS-1$
- public static final String TYPES_ERR_0021 = "ERR.003.029.0021"; //$NON-NLS-1$
- public static final String TYPES_ERR_0022 = "ERR.003.029.0022"; //$NON-NLS-1$
- public static final String TYPES_ERR_0023 = "ERR.003.029.0023"; //$NON-NLS-1$
- public static final String TYPES_ERR_0024 = "ERR.003.029.0024"; //$NON-NLS-1$
- public static final String TYPES_ERR_0025 = "ERR.003.029.0025"; //$NON-NLS-1$
- public static final String TYPES_ERR_0026 = "ERR.003.029.0026"; //$NON-NLS-1$
-
- public static final String CM_UTIL_ERR_0068 = "ERR.003.030.0068";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0062 = "ERR.003.030.0062";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0064 = "ERR.003.030.0064";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0066 = "ERR.003.030.0066";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0067 = "ERR.003.030.0067";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0071 = "ERR.003.030.0071";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0072 = "ERR.003.030.0072";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0073 = "ERR.003.030.0073";
//$NON-NLS-1$
-
- public static final String CM_UTIL_ERR_0074 = "ERR.003.030.0074";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0075 = "ERR.003.030.0075";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0076 = "ERR.003.030.0076";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0077 = "ERR.003.030.0077";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0078 = "ERR.003.030.0078";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0079 = "ERR.003.030.0079";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0081 = "ERR.003.030.0081";
//$NON-NLS-1$
-
-
- public static final String PROPERTIES_ERR_0010 = "ERR.003.021.0010";
//$NON-NLS-1$
- public static final String PROPERTIES_ERR_0011 = "ERR.003.021.0011";
//$NON-NLS-1$
-
- public static final String SEC_MEMBERSHIP_0013 = "ERR.014.407.0013";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0014 = "ERR.014.407.0014";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0015 = "ERR.014.407.0015";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0016 = "ERR.014.407.0016";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0017 = "ERR.014.407.0017";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0018 = "ERR.014.407.0018";
//$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0019 = "ERR.014.407.0019";
//$NON-NLS-1$
-
-
- public static final String CM_UTIL_ERR_0176 = "ERR.003.030.0176";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0177 = "ERR.003.030.0177";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0178 = "ERR.003.030.0178";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0179 = "ERR.003.030.0179";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0180 = "ERR.003.030.0180";
//$NON-NLS-1$
- public static final String CM_UTIL_ERR_0181 = "ERR.003.030.0181";
//$NON-NLS-1$
-
-}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -32,7 +32,6 @@
import javax.crypto.SealedObject;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.util.Base64;
@@ -76,13 +75,13 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0071,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0071, e.getClass().getName(),
e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0071",
CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(),
e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
public String decrypt( String ciphertext ) throws CryptoException {
if ( ciphertext == null ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0074,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0074));
+ throw new CryptoException( "ERR.003.030.0074",
CorePlugin.Util.getString("ERR.003.030.0074")); //$NON-NLS-1$ //$NON-NLS-2$
}
ciphertext = stripEncryptionPrefix(ciphertext);
@@ -92,7 +91,7 @@
try {
cipherBytes = Base64.decode(ciphertext);
} catch ( IllegalArgumentException e ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0075,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0075, e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0075",
CorePlugin.Util.getString("ERR.003.030.0075", e.getMessage())); //$NON-NLS-1$
//$NON-NLS-2$
}
// Perform standard decryption
byte[] cleartext = decrypt( cipherBytes );
@@ -121,11 +120,11 @@
decryptCipher = Cipher.getInstance( cipherAlgorithm);
decryptCipher.init( Cipher.DECRYPT_MODE, decryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0076,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0076, cipherAlgorithm ));
+ throw new CryptoException( e, "ERR.003.030.0076",
CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$
//$NON-NLS-2$
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0077,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0077, cipherAlgorithm,
e.getClass().getName(), e.getMessage() ));
+ throw new CryptoException( "ERR.003.030.0077",
CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm,
e.getClass().getName(), e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0079,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0079, e.getClass().getName(),
e.getMessage()) );
+ throw new CryptoException( e, "ERR.003.030.0079",
CorePlugin.Util.getString("ERR.003.030.0079", e.getClass().getName(),
e.getMessage()) ); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -145,7 +144,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0071,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0071, e.getClass().getName(),
e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0071",
CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(),
e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -163,17 +162,17 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, e.getMessage()));
+ throw new CryptoException("ERR.003.030.0081",
CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$
//$NON-NLS-2$
}
}
public String encrypt( String cleartext ) throws CryptoException {
if ( cleartext == null ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0072,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0072));
+ throw new CryptoException( "ERR.003.030.0072",
CorePlugin.Util.getString("ERR.003.030.0072")); //$NON-NLS-1$ //$NON-NLS-2$
}
String clearString = new String(cleartext);
if ( clearString.trim().length() == 0 && clearString.length() == 0 ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0073,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0073));
+ throw new CryptoException( "ERR.003.030.0073",
CorePlugin.Util.getString("ERR.003.030.0073")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Turn char array into string and get its bytes using "standard"
encoding
byte[] clearBytes = clearString.getBytes();
@@ -197,17 +196,17 @@
encryptCipher = Cipher.getInstance( cipherAlgorithm );
encryptCipher.init( Cipher.ENCRYPT_MODE, encryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0076,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0076, cipherAlgorithm ));
+ throw new CryptoException( e, "ERR.003.030.0076",
CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$
//$NON-NLS-2$
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException(e, ErrorMessageKeys.CM_UTIL_ERR_0072,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0077, cipherAlgorithm ,
e.getMessage() ));
+ throw new CryptoException(e, "ERR.003.030.0072",
CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm , e.getMessage()
)); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0078,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0078, e.getMessage() ));
+ throw new CryptoException( e, "ERR.003.030.0078",
CorePlugin.Util.getString("ERR.003.030.0078", e.getMessage() )); //$NON-NLS-1$
//$NON-NLS-2$
}
}
public synchronized Object sealObject(Object object) throws CryptoException {
if (object != null && !(object instanceof Serializable)) {
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, "not
Serializable")); //$NON-NLS-1$
+ throw new CryptoException("ERR.003.030.0081",
CorePlugin.Util.getString("ERR.003.030.0081", "not Serializable"));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
try {
return new SealedObject((Serializable)object, encryptCipher);
@@ -217,7 +216,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081,
CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, e.getMessage()));
+ throw new CryptoException("ERR.003.030.0081",
CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -41,7 +41,6 @@
import java.util.Set;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.basic.AnyToObjectTransform;
import org.teiid.core.types.basic.AnyToStringTransform;
import org.teiid.core.types.basic.BooleanToNumberTransform;
@@ -323,7 +322,7 @@
public static Transform getTransform(Class sourceType, Class targetType) {
if (sourceType == null || targetType == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0002, sourceType, targetType));
+ "ERR.003.029.0002", sourceType, targetType)); //$NON-NLS-1$
}
return getTransformFromMaps(
DataTypeManager.getDataTypeName(sourceType), DataTypeManager
@@ -345,7 +344,7 @@
String targetTypeName) {
if (sourceTypeName == null || targetTypeName == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0003, sourceTypeName,
+ "ERR.003.029.0003", sourceTypeName, //$NON-NLS-1$
targetTypeName));
}
return getTransformFromMaps(sourceTypeName, targetTypeName);
@@ -363,7 +362,7 @@
public static boolean isTransformable(Class sourceType, Class targetType) {
if (sourceType == null || targetType == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0002, sourceType, targetType));
+ "ERR.003.029.0002", sourceType, targetType)); //$NON-NLS-1$
}
return (getTransformFromMaps(DataTypeManager
.getDataTypeName(sourceType), DataTypeManager
@@ -385,7 +384,7 @@
String targetTypeName) {
if (sourceTypeName == null || targetTypeName == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0003, sourceTypeName,
+ "ERR.003.029.0003", sourceTypeName, //$NON-NLS-1$
targetTypeName));
}
return (getTransformFromMaps(sourceTypeName, targetTypeName) != null);
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import java.math.BigDecimal;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -44,7 +43,7 @@
try {
return new BigDecimal(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0014,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0014, value));
+ throw new TransformationException("ERR.003.029.0014",
CorePlugin.Util.getString("ERR.003.029.0014", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import java.math.BigInteger;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -44,7 +43,7 @@
try {
return new BigInteger(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0015,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0015, value));
+ throw new TransformationException("ERR.003.029.0015",
CorePlugin.Util.getString("ERR.003.029.0015", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Byte.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0016,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0016, value));
+ throw new TransformationException("ERR.003.029.0016",
CorePlugin.Util.getString("ERR.003.029.0016", value));
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import java.sql.Date;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Date.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0018,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0018, value));
+ throw new TransformationException(e, "ERR.003.029.0018",
CorePlugin.Util.getString("ERR.003.029.0018", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
if (!result.toString().equals(value)) {
throw new
TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date",
value, getTargetType().getSimpleName())); //$NON-NLS-1$
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Double.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0019,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0019, value));
+ throw new TransformationException("ERR.003.029.0019",
CorePlugin.Util.getString("ERR.003.029.0019", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Float.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0020,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0020, value));
+ throw new TransformationException("ERR.003.029.0020",
CorePlugin.Util.getString("ERR.003.029.0020", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Integer.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0021,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0021, value));
+ throw new TransformationException("ERR.003.029.0021",
CorePlugin.Util.getString("ERR.003.029.0021", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Long.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0022,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0022, value));
+ throw new TransformationException("ERR.003.029.0022",
CorePlugin.Util.getString("ERR.003.029.0022", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Short.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0023,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0023, value));
+ throw new TransformationException("ERR.003.029.0023",
CorePlugin.Util.getString("ERR.003.029.0023", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import java.sql.Time;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Time.valueOf((String)value);
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0025,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0025, value));
+ throw new TransformationException(e, "ERR.003.029.0025",
CorePlugin.Util.getString("ERR.003.029.0025", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
if (!result.toString().equals(value)) {
throw new
TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date",
value, getTargetType().getSimpleName())); //$NON-NLS-1$
Modified:
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
===================================================================
---
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import java.sql.Timestamp;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Timestamp.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0024,
CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0024, value));
+ throw new TransformationException(e, "ERR.003.029.0024",
CorePlugin.Util.getString("ERR.003.029.0024", value)); //$NON-NLS-1$
//$NON-NLS-2$
}
//validate everything except for fractional seconds
if (!((String)value).startsWith(result.toString().substring(0, 19))) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-09-08
16:07:43 UTC (rev 2545)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -109,7 +109,6 @@
import org.teiid.query.sql.util.ValueIterator;
import org.teiid.query.sql.util.ValueIteratorSource;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.xquery.saxon.SaxonXQueryExpression;
import org.teiid.translator.WSConnection.Util;
@@ -224,7 +223,7 @@
} else if (criteria instanceof ExpressionCriteria) {
return (Boolean)evaluate(((ExpressionCriteria)criteria).getExpression(),
tuple);
} else {
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0010,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0010, criteria));
+ throw new ExpressionEvaluationException("ERR.015.006.0010",
QueryPlugin.Util.getString("ERR.015.006.0010", criteria)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -274,7 +273,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[]
{"left", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011",
QueryPlugin.Util.getString("ERR.015.006.0011", new Object[] {"left",
criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -287,7 +286,7 @@
try {
rightValue = evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new
Object[]{"right", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011",
QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right",
criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -310,7 +309,7 @@
case CompareCriteria.GE:
return Boolean.valueOf((compareValues(leftValue, rightValue) >= 0));
default:
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0012,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0012, criteria.getOperator()));
+ throw new ExpressionEvaluationException("ERR.015.006.0012",
QueryPlugin.Util.getString("ERR.015.006.0012", criteria.getOperator()));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -332,7 +331,7 @@
try {
value = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[]{"left",
criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011",
QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"left",
criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -357,7 +356,7 @@
try {
rightValue = (String) evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new
Object[]{"right", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011",
QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right",
criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -384,7 +383,7 @@
Matcher matcher = patternRegex.matcher(search);
return matcher.matches();
} catch(PatternSyntaxException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0014,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0014, new Object[]{pattern,
e.getMessage()}));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0014",
QueryPlugin.Util.getString("ERR.015.006.0014", new Object[]{pattern,
e.getMessage()})); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -396,7 +395,7 @@
try {
leftValue = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015",
QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$
//$NON-NLS-2$
}
// Shortcut if null
@@ -450,7 +449,7 @@
try {
value = evaluate((Expression) possibleValue, tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e,
ErrorMessageKeys.PROCESSOR_0015,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, possibleValue));
+ throw new ExpressionEvaluationException(e,
"ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015",
possibleValue)); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
value = possibleValue;
@@ -480,7 +479,7 @@
try {
value = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015",
QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$
//$NON-NLS-2$
}
return (value == null ^ criteria.isNegated());
@@ -494,7 +493,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015",
QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$
//$NON-NLS-2$
}
// Shortcut if null
@@ -544,7 +543,7 @@
result = Boolean.valueOf(compare >= 0);
break;
default:
- throw new
ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0012,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0012, criteria.getOperator()));
+ throw new
ExpressionEvaluationException("ERR.015.006.0012",
QueryPlugin.Util.getString("ERR.015.006.0012", criteria.getOperator()));
//$NON-NLS-1$ //$NON-NLS-2$
}
switch(criteria.getPredicateQuantifier()) {
@@ -559,7 +558,7 @@
}
break;
default:
- throw new
ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0057,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0057,
criteria.getPredicateQuantifier()));
+ throw new
ExpressionEvaluationException("ERR.015.006.0057",
QueryPlugin.Util.getString("ERR.015.006.0057",
criteria.getPredicateQuantifier())); //$NON-NLS-1$ //$NON-NLS-2$
}
} else { // value is null
@@ -572,7 +571,7 @@
result = null;
break;
default:
- throw new
ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0057,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0057,
criteria.getPredicateQuantifier()));
+ throw new
ExpressionEvaluationException("ERR.015.006.0057",
QueryPlugin.Util.getString("ERR.015.006.0057",
criteria.getPredicateQuantifier())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -661,7 +660,7 @@
} else if (expression instanceof XMLParse){
return evaluateXMLParse(tuple, (XMLParse)expression);
} else {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0016,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0016,
expression.getClass().getName()));
+ throw new TeiidComponentException("ERR.015.006.0016",
QueryPlugin.Util.getString("ERR.015.006.0016",
expression.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -906,7 +905,7 @@
return internalEvaluate(expr.getThenExpression(i), tuple);
}
} catch (ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, "CASE",
expr.getWhenCriteria(i))); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0033",
QueryPlugin.Util.getString("ERR.015.006.0033", "CASE",
expr.getWhenCriteria(i))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
if (expr.getElseExpression() != null) {
@@ -947,7 +946,7 @@
// Check for special lookup function
if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
if(dataMgr == null) {
- throw new ComponentNotFoundException(ErrorMessageKeys.PROCESSOR_0055,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0055));
+ throw new ComponentNotFoundException("ERR.015.006.0055",
QueryPlugin.Util.getString("ERR.015.006.0055")); //$NON-NLS-1$ //$NON-NLS-2$
}
String codeTableName = (String) values[0];
@@ -981,7 +980,7 @@
if(valueIter.hasNext()) {
// The subquery should be scalar, but has produced
// more than one result value - this is an exception case
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0058,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0058,
scalarSubquery.getCommand()));
+ throw new ExpressionEvaluationException("ERR.015.006.0058",
QueryPlugin.Util.getString("ERR.015.006.0058", scalarSubquery.getCommand()));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
return result;
@@ -994,7 +993,7 @@
private CommandContext getContext(LanguageObject expression) throws
TeiidComponentException {
if (context == null) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was
available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033",
QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was
available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return context;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -37,7 +37,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -236,7 +235,7 @@
// give name and types from fd
Method method = getInvocationMethod();
if(method == null) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0002,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0002, getName()));
+ throw new FunctionExecutionException("ERR.015.001.0002",
QueryPlugin.Util.getString("ERR.015.001.0002", getName())); //$NON-NLS-1$
//$NON-NLS-2$
}
if (getDeterministic() >= FunctionMethod.USER_DETERMINISTIC &&
values.length > 0 && values[0] instanceof CommandContext) {
@@ -255,11 +254,11 @@
Object result = method.invoke(null, values);
return importValue(result, getReturnType());
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0003,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0003, getName()));
+ throw new FunctionExecutionException(e, "ERR.015.001.0003",
QueryPlugin.Util.getString("ERR.015.001.0003", getName())); //$NON-NLS-1$
//$NON-NLS-2$
} catch(InvocationTargetException e) {
- throw new FunctionExecutionException(e.getTargetException(),
ErrorMessageKeys.FUNCTION_0003, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0003,
getName()));
+ throw new FunctionExecutionException(e.getTargetException(),
"ERR.015.001.0003", QueryPlugin.Util.getString("ERR.015.001.0003",
getName())); //$NON-NLS-1$ //$NON-NLS-2$
} catch(IllegalAccessException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0004,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0004, method.toString()));
+ throw new FunctionExecutionException(e, "ERR.015.001.0004",
QueryPlugin.Util.getString("ERR.015.001.0004", method.toString()));
//$NON-NLS-1$ //$NON-NLS-2$
} catch (TransformationException e) {
throw new FunctionExecutionException(e, e.getMessage());
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -56,7 +56,6 @@
import org.teiid.language.SQLConstants.NonReserved;
import org.teiid.query.QueryPlugin;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* Static method hooks for most of the function library.
@@ -236,14 +235,14 @@
return new Double(context.getNextRand(((Integer)seed).longValue()));
}
}
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0069,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0069, "rand", seed));
//$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0069",
QueryPlugin.Util.getString("ERR.015.001.0069", "rand", seed));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public static Object rand(CommandContext context) throws FunctionExecutionException
{
if(context != null) {
return new Double(context.getNextRand());
}
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0069,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0069, "rand"));
//$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0069",
QueryPlugin.Util.getString("ERR.015.001.0069", "rand")); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
}
// ================== Function = mod =====================
@@ -450,7 +449,7 @@
int month = getField(date, Calendar.MONTH);
if (month > 11) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0066,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0066,
+ throw new FunctionExecutionException("ERR.015.001.0066",
QueryPlugin.Util.getString("ERR.015.001.0066", //$NON-NLS-1$ //$NON-NLS-2$
new Object[] {"quarter", date.getClass().getName()})); //$NON-NLS-1$
}
return Integer.valueOf(month/3 + 1);
@@ -637,7 +636,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0017,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0017, countValue));
+ throw new FunctionExecutionException("ERR.015.001.0017",
QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$
//$NON-NLS-2$
}
if(string.length() < countValue) {
return string;
@@ -651,7 +650,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0017,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0017, countValue));
+ throw new FunctionExecutionException("ERR.015.001.0017",
QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$
//$NON-NLS-2$
} else if(string.length() < countValue) {
return string;
} else {
@@ -767,11 +766,11 @@
// Check some invalid cases
if(startValue < 1 || (startValue-1) > string1.length()) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0061,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0061, start, string1));
+ throw new FunctionExecutionException("ERR.015.001.0061",
QueryPlugin.Util.getString("ERR.015.001.0061", start, string1)); //$NON-NLS-1$
//$NON-NLS-2$
} else if (len < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0062,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0062, len));
+ throw new FunctionExecutionException("ERR.015.001.0062",
QueryPlugin.Util.getString("ERR.015.001.0062", len)); //$NON-NLS-1$
//$NON-NLS-2$
} else if (string1.length() == 0 && (startValue > 1 || len >0) ) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0063,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0063));
+ throw new FunctionExecutionException("ERR.015.001.0063",
QueryPlugin.Util.getString("ERR.015.001.0063")); //$NON-NLS-1$ //$NON-NLS-2$
}
StringBuffer result = new StringBuffer();
@@ -853,7 +852,7 @@
throws FunctionExecutionException {
int length = padLength.intValue();
if(length < 1) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0025,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0025));
+ throw new FunctionExecutionException("ERR.015.001.0025",
QueryPlugin.Util.getString("ERR.015.001.0025")); //$NON-NLS-1$ //$NON-NLS-2$
}
if(length < str.length()) {
return str.substring(0, length);
@@ -863,7 +862,7 @@
}
// Get pad character
if(padStr.length() == 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0027,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0027));
+ throw new FunctionExecutionException("ERR.015.001.0027",
QueryPlugin.Util.getString("ERR.015.001.0027")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Pad string
StringBuffer outStr = new StringBuffer(str);
@@ -908,7 +907,7 @@
public static Object translate(String str, String in, String out)
throws FunctionExecutionException {
if(in.length() != out.length()) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0031,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0031));
+ throw new FunctionExecutionException("ERR.015.001.0031",
QueryPlugin.Util.getString("ERR.015.001.0031")); //$NON-NLS-1$ //$NON-NLS-2$
}
if(in.length() == 0 || str.length() == 0) {
@@ -942,7 +941,7 @@
try {
return DataTypeManager.transformValue(src, DataTypeManager.getDataTypeClass(type));
} catch(TransformationException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0033, new Object[]{src,
DataTypeManager.getDataTypeName(src.getClass()), type}));
+ throw new FunctionExecutionException(e, "ERR.015.001.0033",
QueryPlugin.Util.getString("ERR.015.001.0033", new Object[]{src,
DataTypeManager.getDataTypeName(src.getClass()), type})); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -959,7 +958,7 @@
public static Object context(Object context, Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035));
+ throw new FunctionExecutionException("ERR.015.001.0035",
QueryPlugin.Util.getString("ERR.015.001.0035")); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -973,7 +972,7 @@
public static Object rowlimit(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035a,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035a));
+ throw new FunctionExecutionException("ERR.015.001.0035a",
QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -987,7 +986,7 @@
public static Object rowlimitexception(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035a,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035a));
+ throw new FunctionExecutionException("ERR.015.001.0035a",
QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
}
// ================== Function = lookup =====================
@@ -1033,7 +1032,7 @@
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0042,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0042 ,
+ throw new FunctionExecutionException("ERR.015.001.0042",
QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
iae.getMessage()));
}
}
@@ -1045,7 +1044,7 @@
try {
return df.parse(date);
} catch (ParseException e) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0043,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0043 ,
+ throw new FunctionExecutionException("ERR.015.001.0043",
QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
date, format));
}
}
@@ -1062,7 +1061,7 @@
DecimalFormat df = new DecimalFormat(format);
return df.format(number);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0042,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0042 ,
+ throw new FunctionExecutionException("ERR.015.001.0042",
QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
iae.getMessage()));
}
}
@@ -1112,7 +1111,7 @@
try {
return df.parse(number);
} catch (ParseException e) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0043,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0043 ,
+ throw new FunctionExecutionException("ERR.015.001.0043",
QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
number,format));
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -46,7 +46,6 @@
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.function.metadata.FunctionParameter;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -107,7 +106,7 @@
if(sourceObj instanceof FunctionMetadataSource) {
addSource((FunctionMetadataSource) sourceObj);
} else {
-
Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0044,
sourceObj.getClass().getName()));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.001.0044",
sourceObj.getClass().getName())); //$NON-NLS-1$
}
}
}
@@ -127,7 +126,7 @@
while(functionIter.hasNext()) {
Object functionObj = functionIter.next();
if(! (functionObj instanceof FunctionMethod)) {
-
Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0045,
functionObj.getClass().getName()));
+
Assertion.failed(QueryPlugin.Util.getString("ERR.015.001.0045",
functionObj.getClass().getName())); //$NON-NLS-1$
}
FunctionMethod method = (FunctionMethod) functionObj;
@@ -138,7 +137,7 @@
// Add to tree
addFunction(source, method);
} else {
- LogManager.logWarning(LogConstants.CTX_FUNCTION_TREE,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0046, new Object[]{method}));
+ LogManager.logWarning(LogConstants.CTX_FUNCTION_TREE,
QueryPlugin.Util.getString("ERR.015.001.0046", new Object[]{method}));
//$NON-NLS-1$
}
}
}
@@ -310,10 +309,10 @@
// not have the function jar files. The modeler never invokes, so this
isn't a
// problem.
} catch (Exception e) {
- throw new TeiidRuntimeException(e, ErrorMessageKeys.FUNCTION_0047,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0047, new
Object[]{method.getInvocationClass(), invocationMethod, inputTypes}));
+ throw new TeiidRuntimeException(e, "ERR.015.001.0047",
QueryPlugin.Util.getString("ERR.015.001.0047", new
Object[]{method.getInvocationClass(), invocationMethod, inputTypes})); //$NON-NLS-1$
//$NON-NLS-2$
}
if(invocationMethod != null &&
!FunctionTree.isValidMethod(invocationMethod)) {
- throw new TeiidRuntimeException(ErrorMessageKeys.FUNCTION_0047,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0047, new
Object[]{method.getInvocationClass(), invocationMethod, inputTypes}));
+ throw new TeiidRuntimeException("ERR.015.001.0047",
QueryPlugin.Util.getString("ERR.015.001.0047", new
Object[]{method.getInvocationClass(), invocationMethod, inputTypes})); //$NON-NLS-1$
//$NON-NLS-2$
}
} else {
inputTypes.add(0, CommandContext.class);
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.query.function.metadata.FunctionMetadataValidator;
import org.teiid.query.function.source.SystemSource;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
public class SystemFunctionManager {
@@ -44,7 +43,7 @@
validateSource(systemSource, report);
if(report.hasItems()) {
// Should never happen as SystemSource doesn't change
- System.err.println(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0005,
report));
+ System.err.println(QueryPlugin.Util.getString("ERR.015.001.0005",
report)); //$NON-NLS-1$
}
systemFunctionTree = new FunctionTree(systemSource);
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -30,7 +30,6 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -90,7 +89,7 @@
try {
return ((BigDecimal)sum).divide(new BigDecimal(count), AVG_SCALE,
BigDecimal.ROUND_HALF_UP);
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e,
ErrorMessageKeys.FUNCTION_0048, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0048,
sum, new Integer(count)));
+ throw new FunctionExecutionException(e, "ERR.015.001.0048",
QueryPlugin.Util.getString("ERR.015.001.0048", sum, new Integer(count)));
//$NON-NLS-1$ //$NON-NLS-2$
}
default:
throw new AssertionError("unknown accumulator type");
//$NON-NLS-1$
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -57,7 +56,7 @@
maxValue = valueComp;
}
} else {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0050,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0050, "MAX",
value.getClass().getName())); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0050",
QueryPlugin.Util.getString("ERR.015.001.0050", "MAX",
value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -57,7 +56,7 @@
minValue = valueComp;
}
} else {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0050,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0050, "MIN",
value.getClass().getName())); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0050",
QueryPlugin.Util.getString("ERR.015.001.0050", "MIN",
value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -29,7 +29,6 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.query.QueryPlugin;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -79,7 +78,7 @@
*/
public static final void validateFunctionMethod(FunctionMethod method, ActivityReport
report) {
if(method == null) {
- updateReport(report, method,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0052, "FunctionMethod"));
//$NON-NLS-1$
+ updateReport(report, method,
QueryPlugin.Util.getString("ERR.015.001.0052", "FunctionMethod"));
//$NON-NLS-1$ //$NON-NLS-2$
return; // can't validate
}
@@ -127,7 +126,7 @@
*/
public static final void validateFunctionParameter(FunctionParameter param) throws
FunctionMetadataException {
if(param == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0053,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0053));
+ throw new FunctionMetadataException("ERR.015.001.0053",
QueryPlugin.Util.getString("ERR.015.001.0053")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Validate attributes
@@ -166,7 +165,7 @@
validateIsNotNull(type, "Type"); //$NON-NLS-1$
if(DataTypeManager.getDataTypeClass(type) == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0054,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0054, type));
+ throw new FunctionMetadataException("ERR.015.001.0054",
QueryPlugin.Util.getString("ERR.015.001.0054", type)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -227,7 +226,7 @@
*/
private static final void validateIsNotNull(Object object, String objName) throws
FunctionMetadataException {
if(object == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0052,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0052, objName));
+ throw new FunctionMetadataException("ERR.015.001.0052",
QueryPlugin.Util.getString("ERR.015.001.0052", objName)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -241,7 +240,7 @@
*/
private static final void validateLength(String string, int maxLength, String strName)
throws FunctionMetadataException {
if(string.length() > maxLength) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0055,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0055,strName, new
Integer(maxLength)));
+ throw new FunctionMetadataException("ERR.015.001.0055",
QueryPlugin.Util.getString("ERR.015.001.0055",strName, new Integer(maxLength)));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -262,14 +261,14 @@
char firstChar = name.charAt(0);
if(! Character.isLetter(firstChar)) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0056,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0056,strName, new
Character(firstChar)));
+ throw new FunctionMetadataException("ERR.015.001.0056",
QueryPlugin.Util.getString("ERR.015.001.0056",strName, new
Character(firstChar))); //$NON-NLS-1$ //$NON-NLS-2$
}
// Then check the rest of the characters
for(int i=1; i<name.length(); i++) {
char ch = name.charAt(i);
if(! (Character.isLetterOrDigit(ch) || ch == '_')) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0057,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0057,strName, new Character(ch)));
+ throw new FunctionMetadataException("ERR.015.001.0057",
QueryPlugin.Util.getString("ERR.015.001.0057",strName, new Character(ch)));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -288,7 +287,7 @@
if(identifier.length() > 0) {
char firstChar = identifier.charAt(0);
if(! Character.isJavaIdentifierStart(firstChar)) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0056,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0056,strName, new
Character(firstChar)));
+ throw new FunctionMetadataException("ERR.015.001.0056",
QueryPlugin.Util.getString("ERR.015.001.0056",strName, new
Character(firstChar))); //$NON-NLS-1$ //$NON-NLS-2$
}
// Then check the rest of the characters
@@ -296,13 +295,13 @@
char ch = identifier.charAt(i);
if(! Character.isJavaIdentifierPart(ch)) {
if(! allowMultiple || ! (ch == '.')) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0057,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0057,strName, new Character(ch)));
+ throw new FunctionMetadataException("ERR.015.001.0057",
QueryPlugin.Util.getString("ERR.015.001.0057",strName, new Character(ch)));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
}
if(identifier.charAt(identifier.length()-1) == '.') {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0058,
QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0058,strName));
+ throw new FunctionMetadataException("ERR.015.001.0058",
QueryPlugin.Util.getString("ERR.015.001.0058",strName)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -33,7 +33,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -386,7 +385,7 @@
}
return traverseDownForFirstNodeWithPropertyString(propertyKey, value,
isStringValue, node, true);
} else {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0009,
searchDirection ));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.002.0009",
searchDirection )); //$NON-NLS-1$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -35,7 +35,6 @@
import javax.xml.stream.XMLStreamWriter;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -147,7 +146,7 @@
*/
void addElementProperty(String name, Object value ) throws XMLStreamException {
if ( value == null ) {
- throw new IllegalArgumentException(
QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0010, name) );
+ throw new IllegalArgumentException(
QueryPlugin.Util.getString("ERR.015.002.0010", name) ); //$NON-NLS-1$
}
if (value instanceof Collection){
Iterator i = ((Collection)value).iterator();
@@ -172,7 +171,7 @@
} else if ( obj instanceof Boolean ) {
return getXMLText( (Boolean)obj );
} else {
- throw new IllegalArgumentException(
QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0011, obj.getClass().getName() ));
+ throw new IllegalArgumentException(
QueryPlugin.Util.getString("ERR.015.002.0011", obj.getClass().getName() ));
//$NON-NLS-1$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -95,7 +95,6 @@
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.EvaluatableVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class PlanToProcessConverter {
@@ -447,7 +446,7 @@
break;
default:
- throw new
QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0007,
NodeConstants.getNodeTypeString(node.getType())));
+ throw new
QueryPlannerException(QueryExecPlugin.Util.getString("ERR.015.004.0007",
NodeConstants.getNodeTypeString(node.getType()))); //$NON-NLS-1$
}
if(processNode != null) {
@@ -538,7 +537,7 @@
String cbName = metadata.getFullName(modelID);
return cbName;
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0009));
+ throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString("ERR.015.004.0009")); //$NON-NLS-1$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -105,7 +105,6 @@
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.validator.ValidationVisitor;
@@ -261,7 +260,7 @@
}
if(! appliedHint) {
- String msg =
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0010, groupName);
+ String msg =
QueryExecPlugin.Util.getString("ERR.015.004.0010", groupName); //$NON-NLS-1$
if (this.analysisRecord.recordAnnotations()) {
this.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, msg,
"ignoring hint", Priority.MEDIUM)); //$NON-NLS-1$
}
@@ -1036,7 +1035,7 @@
try {
result = QueryParser.getQueryParser().parseCommand(qnode.getQuery());
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0011,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0011, qnode.getGroupName()));
+ throw new QueryResolverException(e, "ERR.015.008.0011",
QueryPlugin.Util.getString("ERR.015.008.0011", qnode.getGroupName()));
//$NON-NLS-1$ //$NON-NLS-2$
}
//Handle bindings and references
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -67,7 +67,6 @@
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class FrameUtil {
@@ -300,7 +299,7 @@
try {
return QueryRewriter.rewriteCriteria(criteria, null, null, metadata);
} catch(TeiidProcessingException e) {
- throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0023, criteria));
+ throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString("ERR.015.004.0023", criteria)); //$NON-NLS-1$
} catch (TeiidComponentException e) {
throw new TeiidRuntimeException(e);
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -41,7 +41,6 @@
import org.teiid.query.sql.lang.Update;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -116,7 +115,7 @@
}
Object groups = node.getGroups();
- throw new
QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0012, new
Object[] {groups, accessPatterns}));
+ throw new
QueryPlannerException(QueryExecPlugin.Util.getString("ERR.015.004.0012", new
Object[] {groups, accessPatterns})); //$NON-NLS-1$
}
public String toString() {
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -57,7 +57,6 @@
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
public final class RulePushSelectCriteria implements OptimizerRule {
@@ -298,7 +297,7 @@
return currentNode.getFirstChild();
}
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0020,
currentNode.getGroups()));
+ throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString("ERR.015.004.0020", currentNode.getGroups()));
//$NON-NLS-1$
}
} else if(currentNode.getType() == NodeConstants.Types.JOIN) {
//pushing below a join is not necessary under an access node
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -40,7 +40,6 @@
import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.lang.Update;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -72,7 +71,7 @@
if(CapabilitiesUtil.requiresCriteria(modelID, metadata, capFinder)
&& hasNoCriteria((Command)
node.getProperty(NodeConstants.Info.ATOMIC_REQUEST))) {
String modelName = metadata.getFullName(modelID);
- throw new
QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0024,
modelName));
+ throw new
QueryPlannerException(QueryExecPlugin.Util.getString("ERR.015.004.0024",
modelName)); //$NON-NLS-1$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -44,7 +44,6 @@
import org.teiid.query.sql.symbol.Function;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class CriteriaPlanner {
@@ -89,7 +88,7 @@
if (context == null) {
context = otherContext;
} else if (context != otherContext){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0068,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0068, criteria));
+ throw new QueryPlannerException("ERR.015.004.0068",
QueryExecPlugin.Util.getString("ERR.015.004.0068", criteria)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -301,7 +300,7 @@
//assumes that all non-xml group elements are temp elements
boolean hasTempElement = !metadata.isXMLGroup(group.getMetadataID());
if(!first && hasTempElement && resultSet == null) {
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0035,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0035, conjunct));
+ throw new QueryPlannerException("ERR.015.004.0035",
QueryExecPlugin.Util.getString("ERR.015.004.0035", conjunct)); //$NON-NLS-1$
//$NON-NLS-2$
}
if (hasTempElement) {
@@ -336,7 +335,7 @@
MappingNode contextNode = MappingNode.findNode(planEnv.mappingDoc,
targetContext.getCanonicalName());
if (contextNode == null){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0037,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0037, targetContext));
+ throw new QueryPlannerException("ERR.015.004.0037",
QueryExecPlugin.Util.getString("ERR.015.004.0037", targetContext));
//$NON-NLS-1$ //$NON-NLS-2$
}
return contextNode;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -58,7 +58,6 @@
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
@@ -84,7 +83,7 @@
try {
query = QueryParser.getQueryParser().parseCommand(queryNode.getQuery());
} catch (QueryParserException e) {
- throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0054, new
Object[]{queryNode.getGroupName(), queryNode.getQuery()}));
+ throw new QueryPlannerException(e,
QueryExecPlugin.Util.getString("ERR.015.004.0054", new
Object[]{queryNode.getGroupName(), queryNode.getQuery()})); //$NON-NLS-1$
}
}
return query;
@@ -144,7 +143,7 @@
ResolverUtil.resolveGroup(gs, metadata);
queryNode = metadata.getVirtualPlan(gs.getMetadataID());
} catch (QueryResolverException e) {
- throw new QueryPlannerException(e, ErrorMessageKeys.OPTIMIZER_0029,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0029, groupName));
+ throw new QueryPlannerException(e, "ERR.015.004.0029",
QueryExecPlugin.Util.getString("ERR.015.004.0029", groupName)); //$NON-NLS-1$
//$NON-NLS-2$
}
return queryNode;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -37,7 +37,6 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Symbol;
import org.teiid.query.sql.visitor.AbstractSymbolMappingVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -124,7 +123,7 @@
Collection unmappedSymbols = mappingVisitor.getUnmappedSymbols();
if (unmappedSymbols != null && unmappedSymbols.size() > 0){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0046,
QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0046, new Object[]
{unmappedSymbols, object}));
+ throw new QueryPlannerException("ERR.015.004.0046",
QueryExecPlugin.Util.getString("ERR.015.004.0046", new Object[]
{unmappedSymbols, object})); //$NON-NLS-1$ //$NON-NLS-2$
}
return copy;
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -64,7 +64,6 @@
import org.teiid.query.sql.util.VariableContext;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
*/
@@ -532,7 +531,7 @@
private CursorState getCursorState(String rsKey) throws TeiidComponentException {
CursorState state = this.cursorStates.get(rsKey);
if (state == null) {
- throw new
TeiidComponentException(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0037,
rsKey));
+ throw new
TeiidComponentException(QueryExecPlugin.Util.getString("ERR.015.006.0037",
rsKey)); //$NON-NLS-1$
}
return state;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -48,7 +48,6 @@
import org.teiid.query.sql.symbol.ExpressionSymbol;
import org.teiid.query.sql.symbol.SelectSymbol;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
public class ProjectNode extends SubqueryAwareRelationalNode {
@@ -218,7 +217,7 @@
Expression expression = ((ExpressionSymbol)symbol).getExpression();
tuple.add(getEvaluator(this.elementMap).evaluate(expression, values));
} else {
-
Assertion.failed(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0034,
symbol.getClass().getName()));
+ Assertion.failed(QueryExecPlugin.Util.getString("ERR.015.006.0034",
symbol.getClass().getName())); //$NON-NLS-1$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
import org.teiid.query.execution.QueryExecPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -43,7 +42,7 @@
* Default message included in the RuntimeException thrown from
* {@link #process}
*/
- public static final String DEFAULT_MESSAGE =
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0054);
+ public static final String DEFAULT_MESSAGE =
QueryExecPlugin.Util.getString("ERR.015.006.0054"); //$NON-NLS-1$
/**
* Constructor for AbortProcessingInstruction.
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -29,7 +29,6 @@
import org.teiid.core.util.Assertion;
import org.teiid.logging.LogManager;
import org.teiid.query.execution.QueryExecPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
import org.xml.sax.SAXException;
@@ -71,7 +70,7 @@
doc.moveToLastChild();
break;
default:
-
Assertion.failed(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0051,
direction));
+
Assertion.failed(QueryExecPlugin.Util.getString("ERR.015.006.0051", direction));
//$NON-NLS-1$
break;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -29,7 +29,6 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.sql.lang.Criteria;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -93,7 +92,7 @@
//handle the case of exception on recursion limit reached
if (terminate && this.exceptionOnRecursionLimit){
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0039,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0039));
+ throw new TeiidComponentException("ERR.015.006.0039",
QueryExecPlugin.Util.getString("ERR.015.006.0039")); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -61,7 +61,6 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
@@ -226,7 +225,7 @@
if (xmlSchemas == null || xmlSchemas.isEmpty()){
// if there is no schema no need to validate
// return a warning saying there is no schema
- TeiidException noSchema = new
TeiidComponentException(ErrorMessageKeys.PROCESSOR_0042,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0042));
+ TeiidException noSchema = new
TeiidComponentException("ERR.015.006.0042",
QueryExecPlugin.Util.getString("ERR.015.006.0042")); //$NON-NLS-1$
//$NON-NLS-2$
addWarning(noSchema);
return;
}
@@ -389,7 +388,7 @@
} catch (Exception e){
e.printStackTrace();
LogManager.logWarning(LogConstants.CTX_XML_PLAN, e,
-
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0001));
+
QueryExecPlugin.Util.getString("ERR.015.006.0001")); //$NON-NLS-1$
}
return "XMLPlan"; //$NON-NLS-1$
}
@@ -440,13 +439,13 @@
}
public void error(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0049,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0049",
QueryExecPlugin.Util.getString("ERR.015.006.0048", ex.getMessage())));
//$NON-NLS-1$ //$NON-NLS-2$
}
public void fatalError(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0048,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0048",
QueryExecPlugin.Util.getString("ERR.015.006.0048", ex.getMessage())));
//$NON-NLS-1$ //$NON-NLS-2$
}
public void warning(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0049,
QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0049",
QueryExecPlugin.Util.getString("ERR.015.006.0048", ex.getMessage())));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/report/ActivityReport.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import java.util.Iterator;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -74,7 +73,7 @@
*/
public void addItem(ReportItem item) {
if(item == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.REPORT_0001));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001"));
//$NON-NLS-1$
}
this.items.add(item);
@@ -87,7 +86,7 @@
*/
public void addItems(Collection items) {
if(items == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.REPORT_0001));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001"));
//$NON-NLS-1$
}
Iterator iter = items.iterator();
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -46,7 +46,6 @@
import org.teiid.query.sql.proc.CreateUpdateProcedureCommand;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public abstract class ProcedureContainerResolver implements CommandResolver {
@@ -88,7 +87,7 @@
try {
subCommand = parser.parseCommand(plan);
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0045,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0045, group));
+ throw new QueryResolverException(e, "ERR.015.008.0045",
QueryPlugin.Util.getString("ERR.015.008.0045", group)); //$NON-NLS-1$
//$NON-NLS-2$
}
if(subCommand instanceof CreateUpdateProcedureCommand){
@@ -204,7 +203,7 @@
String plan = getPlan(metadata, procCommand.getGroup());
if(plan == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0009,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0009, procCommand.getGroup(),
procCommand.getClass().getSimpleName()));
+ throw new QueryResolverException("ERR.015.008.0009",
QueryPlugin.Util.getString("ERR.015.008.0009", procCommand.getGroup(),
procCommand.getClass().getSimpleName())); //$NON-NLS-1$ //$NON-NLS-2$
}
return plan;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -57,7 +57,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -154,7 +153,7 @@
}
if(!namedParameters && (inputParams != inputExpressions.size())) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0007,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0007, new Object[] {new
Integer(inputParams), new Integer(inputExpressions.size()),
storedProcedureCommand.getGroup().toString()}));
+ throw new QueryResolverException("ERR.015.008.0007",
QueryPlugin.Util.getString("ERR.015.008.0007", new Object[] {new
Integer(inputParams), new Integer(inputExpressions.size()),
storedProcedureCommand.getGroup().toString()})); //$NON-NLS-1$ //$NON-NLS-2$
}
// Walk through the resolved parameters and set the expressions from the
@@ -268,7 +267,7 @@
// and add implicit conversion if necessary
Class exprType = expr.getType();
if(paramType == null || exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0061,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0061,
storedProcedureCommand.getProcedureName(), param.getName()));
+ throw new QueryResolverException("ERR.015.008.0061",
QueryPlugin.Util.getString("ERR.015.008.0061",
storedProcedureCommand.getProcedureName(), param.getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
String tgtType = DataTypeManager.getDataTypeName(paramType);
String srcType = DataTypeManager.getDataTypeName(exprType);
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -57,7 +57,6 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.symbol.SingleElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -151,7 +150,7 @@
try {
resolveList(insert.getVariables(), metadata, null, groups);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e,
QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0054, insert.getGroup(),
e.getUnresolvedSymbols()));
+ throw new QueryResolverException(e,
QueryPlugin.Util.getString("ERR.015.012.0054", insert.getGroup(),
e.getUnresolvedSymbols())); //$NON-NLS-1$
}
}
@@ -176,7 +175,7 @@
// check that # of variables == # of values
if(values.size() != insert.getVariables().size()) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0010,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0010, insert.getVariables().size(),
values.size()));
+ throw new QueryResolverException("ERR.015.008.0010",
QueryPlugin.Util.getString("ERR.015.008.0010", insert.getVariables().size(),
values.size())); //$NON-NLS-1$ //$NON-NLS-2$
}
Iterator valueIter = values.iterator();
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -45,7 +45,6 @@
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.symbol.SingleElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public class SetQueryResolver implements CommandResolver {
@@ -76,7 +75,7 @@
QueryResolver.resolveCommand(rightCommand, Collections.EMPTY_MAP,
metadata.getMetadata(), analysis, false);
if (firstProject.size() != rightCommand.getProjectedSymbols().size()) {
- throw new
QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0035,
setQuery.getOperation()));
+ throw new
QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0035",
setQuery.getOperation())); //$NON-NLS-1$
}
checkSymbolTypes(firstProjectTypes, rightCommand.getProjectedSymbols());
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -84,7 +84,6 @@
import org.teiid.query.sql.symbol.ScalarSubquery;
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class SimpleQueryResolver implements CommandResolver {
@@ -140,7 +139,7 @@
String groupAlias = name.substring(0, index);
List<GroupSymbol> groupSymbols =
ResolverUtil.findMatchingGroups(groupAlias.toUpperCase(), groups, metadata);
if(groupSymbols.isEmpty() || groupSymbols.size() > 1) {
- String msg =
QueryPlugin.Util.getString(groupSymbols.isEmpty()?ErrorMessageKeys.RESOLVER_0047:"SimpleQueryResolver.ambiguous_all_in_group",
allInGroupSymbol); //$NON-NLS-1$
+ String msg =
QueryPlugin.Util.getString(groupSymbols.isEmpty()?"ERR.015.008.0047":"SimpleQueryResolver.ambiguous_all_in_group",
allInGroupSymbol); //$NON-NLS-1$ //$NON-NLS-2$
QueryResolverException qre = new QueryResolverException(msg);
qre.addUnresolvedSymbol(new
UnresolvedSymbolDescription(allInGroupSymbol.toString(), msg));
throw qre;
@@ -374,7 +373,7 @@
visitNode(group);
try {
if (!group.isProcedure() &&
metadata.isXMLGroup(group.getMetadataID())) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0003,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0003));
+ throw new QueryResolverException("ERR.015.008.0003",
QueryPlugin.Util.getString("ERR.015.008.0003")); //$NON-NLS-1$ //$NON-NLS-2$
}
discoveredGroup(group);
if (group.isProcedure()) {
@@ -506,8 +505,8 @@
private void addDiscoveredGroups() {
for (GroupSymbol group : discoveredGroups) {
if (!this.currentGroups.add(group)) {
- String msg = QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0046,
group.getName());
- QueryResolverException qre = new
QueryResolverException(ErrorMessageKeys.RESOLVER_0046, msg);
+ String msg = QueryPlugin.Util.getString("ERR.015.008.0046",
group.getName()); //$NON-NLS-1$
+ QueryResolverException qre = new
QueryResolverException("ERR.015.008.0046", msg); //$NON-NLS-1$
qre.addUnresolvedSymbol(new
UnresolvedSymbolDescription(group.toString(), msg));
throw new TeiidRuntimeException(qre);
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -72,7 +72,6 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -105,7 +104,7 @@
// If still haven't found virtual group, the external metadata is bad
if(virtualGroup == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0012,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0012));
+ throw new QueryResolverException("ERR.015.008.0012",
QueryPlugin.Util.getString("ERR.015.008.0012")); //$NON-NLS-1$ //$NON-NLS-2$
}
ResolveVirtualGroupCriteriaVisitor.resolveCriteria(procCommand, virtualGroup,
metadata);
@@ -132,7 +131,7 @@
try {
transformCmd = QueryParser.getQueryParser().parseCommand(transformQuery);
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0013,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0013, virtualGroup));
+ throw new QueryResolverException(e, "ERR.015.008.0013",
QueryPlugin.Util.getString("ERR.015.008.0013", virtualGroup)); //$NON-NLS-1$
//$NON-NLS-2$
}
QueryResolver.resolveCommand(transformCmd, metadata);
@@ -289,7 +288,7 @@
String groupName = loopStmt.getCursorName();
if (metadata.getMetadataStore().getTempGroupID(groupName) != null) {
- throw new
QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0065));
+ throw new
QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0065"));
//$NON-NLS-1$
}
//check - cursor name should not start with #
@@ -314,7 +313,7 @@
case Statement.TYPE_CONTINUE:
break;
default:
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0015,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0015, statement.getType()));
+ throw new QueryResolverException("ERR.015.008.0015",
QueryPlugin.Util.getString("ERR.015.008.0015", statement.getType()));
//$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -340,7 +339,7 @@
sepIndex = varName.lastIndexOf(ElementSymbol.SEPARATOR);
String groupName = varName.substring(0, sepIndex);
if(!groupName.equals(ProcedureReservedWords.VARIABLES)) {
- handleUnresolvableDeclaration(variable,
QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0031, new
Object[]{ProcedureReservedWords.VARIABLES, variable}));
+ handleUnresolvableDeclaration(variable,
QueryPlugin.Util.getString("ERR.015.010.0031", new
Object[]{ProcedureReservedWords.VARIABLES, variable})); //$NON-NLS-1$
}
}
boolean exists = false;
@@ -351,7 +350,7 @@
//ignore, not already defined
}
if (exists) {
- handleUnresolvableDeclaration(variable,
QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0032, variable.getOutputName()));
+ handleUnresolvableDeclaration(variable,
QueryPlugin.Util.getString("ERR.015.010.0032", variable.getOutputName()));
//$NON-NLS-1$
}
variable.setType(DataTypeManager.getDataTypeClass(typeName));
variable.setGroupSymbol(variables);
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -56,7 +56,6 @@
import org.teiid.query.sql.visitor.CommandCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -113,11 +112,11 @@
//we throw exceptions in these cases, since the clauses will not be resolved
if (query.getGroupBy() != null) {
- throw new
QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0031));
+ throw new
QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0031"));
//$NON-NLS-1$
}
if (query.getHaving() != null) {
- throw new
QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0032));
+ throw new
QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0032"));
//$NON-NLS-1$
}
}
@@ -200,7 +199,7 @@
} else if (ss instanceof ExpressionSymbol) {
throw new
QueryResolverException(QueryPlugin.Util.getString("XMLQueryResolver.no_expressions_in_select"));
//$NON-NLS-1$
} else if (ss instanceof AliasSymbol) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0070,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0070));
+ throw new QueryResolverException("ERR.015.008.0070",
QueryPlugin.Util.getString("ERR.015.008.0070")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -388,11 +387,11 @@
try {
ResolverVisitor.resolveLanguageObject(elem, Collections.EMPTY_LIST,
externalGroups, metadata);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0019,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0019, critElemName));
+ throw new QueryResolverException(e, "ERR.015.008.0019",
QueryPlugin.Util.getString("ERR.015.008.0019", critElemName)); //$NON-NLS-1$
//$NON-NLS-2$
}
} else {
// Found multiple matches
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0020,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0020, critElemName));
+ throw new QueryResolverException("ERR.015.008.0020",
QueryPlugin.Util.getString("ERR.015.008.0020", critElemName)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -44,7 +44,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -75,7 +74,7 @@
* @param metadata source of metadata
*/
public BindVariableVisitor(List bindings, QueryMetadataInterface metadata) {
- ArgCheck.isNotNull(bindings,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0049));
+ ArgCheck.isNotNull(bindings, QueryPlugin.Util.getString("ERR.015.008.0049"));
//$NON-NLS-1$
this.bindings = bindings;
this.metadata = metadata;
@@ -118,7 +117,7 @@
try {
bindReference(obj, binding);
} catch(QueryParserException e) {
- handleException(new
QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0022),
e.getMessage()));
+ handleException(new
QueryResolverException(QueryPlugin.Util.getString("ERR.015.008.0022"),
e.getMessage())); //$NON-NLS-1$
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e, e.getMessage()));
} catch(QueryResolverException e) {
@@ -149,7 +148,7 @@
Expression expr = QueryParser.getQueryParser().parseExpression(binding);
if(!(expr instanceof ElementSymbol)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0025,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0025, expr));
+ throw new QueryResolverException("ERR.015.008.0025",
QueryPlugin.Util.getString("ERR.015.008.0025", expr)); //$NON-NLS-1$
//$NON-NLS-2$
}
ElementSymbol element = (ElementSymbol) expr;
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -72,7 +72,6 @@
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -214,7 +213,7 @@
}
//Expression is wrong type and can't convert
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0041,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0041, new Object[] {targetTypeName,
sourceExpression, sourceTypeName}));
+ throw new QueryResolverException("ERR.015.008.0041",
QueryPlugin.Util.getString("ERR.015.008.0041", new Object[] {targetTypeName,
sourceExpression, sourceTypeName})); //$NON-NLS-1$ //$NON-NLS-2$
}
public static Constant convertConstant(String sourceTypeName,
@@ -288,7 +287,7 @@
Reference ref = (Reference)expression;
if (ref.isPositional() && ref.getType() == null) {
if (targetType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0026,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0026, surroundingExpression));
+ throw new QueryResolverException("ERR.015.008.0026",
QueryPlugin.Util.getString("ERR.015.008.0026", surroundingExpression));
//$NON-NLS-1$ //$NON-NLS-2$
}
ref.setType(targetType);
}
@@ -366,7 +365,7 @@
// if we already have a matched symbol, matching again here means it is
duplicate/ambiguous
if(matchedSymbol != null) {
if (!matchedSymbol.equals(knownElements.get(j))) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0042,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0042, symbolName));
+ throw new QueryResolverException("ERR.015.008.0042",
QueryPlugin.Util.getString("ERR.015.008.0042", symbolName)); //$NON-NLS-1$
//$NON-NLS-2$
}
continue;
}
@@ -405,7 +404,7 @@
try {
ResolverVisitor.resolveLanguageObject(symbol, fromClauseGroups,
command.getExternalGroupContexts(), metadata);
} catch(QueryResolverException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0043,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0043, symbol.getName()) );
+ throw new QueryResolverException(e, "ERR.015.008.0043",
QueryPlugin.Util.getString("ERR.015.008.0043", symbol.getName()) );//$NON-NLS-1$
//$NON-NLS-2$
}
}
ResolverVisitor.resolveLanguageObject(sortKey, metadata);
@@ -758,13 +757,13 @@
// single projected symbol of the subquery
Class exprType = expression.getType();
if(exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, expression));
+ throw new QueryResolverException("ERR.015.008.0030",
QueryPlugin.Util.getString("ERR.015.008.0030", expression)); //$NON-NLS-1$
//$NON-NLS-2$
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
Collection projectedSymbols = crit.getCommand().getProjectedSymbols();
if (projectedSymbols.size() != 1){
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0032,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0032, crit.getCommand()));
+ throw new QueryResolverException("ERR.015.008.0032",
QueryPlugin.Util.getString("ERR.015.008.0032", crit.getCommand()));
//$NON-NLS-1$ //$NON-NLS-2$
}
Class subqueryType = ((Expression)projectedSymbols.iterator().next()).getType();
String subqueryTypeName = DataTypeManager.getDataTypeName(subqueryType);
@@ -772,7 +771,7 @@
try {
result = convertExpression(expression, exprTypeName, subqueryTypeName,
metadata);
} catch (QueryResolverException qre) {
- throw new QueryResolverException(qre, ErrorMessageKeys.RESOLVER_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0033, crit));
+ throw new QueryResolverException(qre, "ERR.015.008.0033",
QueryPlugin.Util.getString("ERR.015.008.0033", crit)); //$NON-NLS-1$
//$NON-NLS-2$
}
return result;
}
@@ -782,17 +781,17 @@
ResolvedLookup result = new ResolvedLookup();
// Special code to handle setting return type of the lookup function to match the
type of the return element
if( !(args[0] instanceof Constant) || !(args[1] instanceof Constant) || !(args[2]
instanceof Constant)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0063,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0063));
+ throw new QueryResolverException("ERR.015.008.0063",
QueryPlugin.Util.getString("ERR.015.008.0063")); //$NON-NLS-1$ //$NON-NLS-2$
}
// If code table name in lookup function refers to temp group throw exception
GroupSymbol groupSym = new GroupSymbol((String) ((Constant)args[0]).getValue());
try {
groupSym.setMetadataID(metadata.getGroupID((String) ((Constant)args[0]).getValue()));
if (groupSym.getMetadataID() instanceof TempMetadataID) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0065,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0065,
((Constant)args[0]).getValue()));
+ throw new QueryResolverException("ERR.015.008.0065",
QueryPlugin.Util.getString("ERR.015.008.0065", ((Constant)args[0]).getValue()));
//$NON-NLS-1$ //$NON-NLS-2$
}
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062,
((Constant)args[0]).getValue()));
+ throw new QueryResolverException("ERR.015.008.0062",
QueryPlugin.Util.getString("ERR.015.008.0062", ((Constant)args[0]).getValue()));
//$NON-NLS-1$ //$NON-NLS-2$
}
result.setGroup(groupSym);
@@ -803,7 +802,7 @@
try {
ResolverVisitor.resolveLanguageObject(returnElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062, returnElementName));
+ throw new QueryResolverException("ERR.015.008.0062",
QueryPlugin.Util.getString("ERR.015.008.0062", returnElementName));
//$NON-NLS-1$ //$NON-NLS-2$
}
result.setReturnElement(returnElement);
@@ -812,7 +811,7 @@
try {
ResolverVisitor.resolveLanguageObject(keyElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062, keyElementName));
+ throw new QueryResolverException("ERR.015.008.0062",
QueryPlugin.Util.getString("ERR.015.008.0062", keyElementName)); //$NON-NLS-1$
//$NON-NLS-2$
}
result.setKeyElement(keyElement);
args[3] = convertExpression(args[3],
DataTypeManager.getDataTypeName(keyElement.getType()), metadata);
@@ -891,7 +890,7 @@
// didn't find this group ID
}
} else if(matches > 1) {
- throw handleUnresolvedGroup(symbol,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0055));
+ throw handleUnresolvedGroup(symbol,
QueryPlugin.Util.getString("ERR.015.008.0055")); //$NON-NLS-1$
}
}
}
@@ -908,7 +907,7 @@
}
if(groupID == null) {
- throw handleUnresolvedGroup(symbol,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0056));
+ throw handleUnresolvedGroup(symbol,
QueryPlugin.Util.getString("ERR.015.008.0056")); //$NON-NLS-1$
}
// set real metadata ID in the symbol
symbol.setMetadataID(groupID);
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -70,7 +70,6 @@
import org.teiid.query.sql.symbol.SearchedCaseExpression;
import org.teiid.query.sql.symbol.XMLQuery;
import org.teiid.query.sql.symbol.XMLSerialize;
-import org.teiid.query.util.ErrorMessageKeys;
public class ResolverVisitor extends LanguageVisitor {
@@ -184,7 +183,7 @@
resolveAgainstGroups(shortCanonicalName, matchedGroups, matches);
if (matches.size() > 1) {
- handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0053, elementSymbol));
+ handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString("ERR.015.008.0053", elementSymbol)); //$NON-NLS-1$
return;
}
@@ -199,9 +198,9 @@
if (matches.isEmpty()) {
if (groupMatched) {
- handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0054, elementSymbol));
+ handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString("ERR.015.008.0054", elementSymbol)); //$NON-NLS-1$
} else {
- handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0051, elementSymbol));
+ handleUnresolvedElement(elementSymbol,
QueryPlugin.Util.getString("ERR.015.008.0051", elementSymbol)); //$NON-NLS-1$
}
return;
}
@@ -307,7 +306,7 @@
try {
resolveFunction(obj, this.metadata.getFunctionLibrary());
} catch(QueryResolverException e) {
- if (ErrorMessageKeys.RESOLVER_0036.equals(e.getCode()) ||
ErrorMessageKeys.RESOLVER_0035.equals(e.getCode())) {
+ if ("ERR.015.008.0036".equals(e.getCode()) ||
"ERR.015.008.0035".equals(e.getCode())) { //$NON-NLS-1$ //$NON-NLS-2$
if (unresolvedFunctions == null) {
unresolvedFunctions = new LinkedHashMap<Function,
QueryResolverException>();
}
@@ -442,7 +441,7 @@
types[i] = args[i].getType();
if(types[i] == null) {
if(!(args[i] instanceof Reference)){
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0035,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0035, new Object[] {args[i],
function}));
+ throw new QueryResolverException("ERR.015.008.0035",
QueryPlugin.Util.getString("ERR.015.008.0035", new Object[] {args[i],
function})); //$NON-NLS-1$ //$NON-NLS-2$
}
hasArgWithoutType = true;
}
@@ -466,14 +465,14 @@
FunctionForm form = library.findFunctionForm(function.getName(), args.length);
if(form == null) {
// Unknown function form
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0039,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0039, function));
+ throw new QueryResolverException("ERR.015.008.0039",
QueryPlugin.Util.getString("ERR.015.008.0039", function)); //$NON-NLS-1$
//$NON-NLS-2$
}
// Known function form - but without type information
if (hasArgWithoutType) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0036,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0036, function));
+ throw new QueryResolverException("ERR.015.008.0036",
QueryPlugin.Util.getString("ERR.015.008.0036", function)); //$NON-NLS-1$
//$NON-NLS-2$
}
// Known function form - unable to find implicit conversions
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0040,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0040, function));
+ throw new QueryResolverException("ERR.015.008.0040",
QueryPlugin.Util.getString("ERR.015.008.0040", function)); //$NON-NLS-1$
//$NON-NLS-2$
}
if(fd.getName().equalsIgnoreCase(FunctionLibrary.CONVERT) ||
fd.getName().equalsIgnoreCase(FunctionLibrary.CAST)) {
@@ -487,7 +486,7 @@
!srcTypeClass.equals(dataTypeClass) &&
!DataTypeManager.isTransformable(srcTypeClass, dataTypeClass)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0037,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0037, new Object[]
{DataTypeManager.getDataTypeName(srcTypeClass), dataType}));
+ throw new QueryResolverException("ERR.015.008.0037",
QueryPlugin.Util.getString("ERR.015.008.0037", new Object[]
{DataTypeManager.getDataTypeName(srcTypeClass), dataType})); //$NON-NLS-1$ //$NON-NLS-2$
}
} else if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
ResolverUtil.ResolvedLookup lookup = ResolverUtil.resolveLookup(function, metadata);
@@ -588,7 +587,7 @@
criteria.setUpperExpression(ResolverUtil.convertExpression(upper, upperTypeName,
commonType, metadata));
} else {
// Couldn't find a common type to implicitly convert to
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0027,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0027, expTypeName, lowerTypeName,
criteria));
+ throw new QueryResolverException("ERR.015.008.0027",
QueryPlugin.Util.getString("ERR.015.008.0027", expTypeName, lowerTypeName,
criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
// invariants: exp.getType() == lower.getType() == upper.getType()
}
@@ -649,7 +648,7 @@
if (commonType == null) {
// Neither are aggs, but types can't be reconciled
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0027,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0027, new Object[] { leftTypeName,
rightTypeName, ccrit }));
+ throw new QueryResolverException("ERR.015.008.0027",
QueryPlugin.Util.getString("ERR.015.008.0027", new Object[] { leftTypeName,
rightTypeName, ccrit })); //$NON-NLS-1$ //$NON-NLS-2$
}
ccrit.setLeftExpression(ResolverUtil.convertExpression(leftExpression, leftTypeName,
commonType, metadata) );
ccrit.setRightExpression(ResolverUtil.convertExpression(rightExpression, rightTypeName,
commonType, metadata) );
@@ -690,7 +689,7 @@
result = ResolverUtil.convertExpression(expr, type,
DataTypeManager.DefaultDataTypes.CLOB, metadata);
} else {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0029,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0029, mcrit));
+ throw new QueryResolverException("ERR.015.008.0029",
QueryPlugin.Util.getString("ERR.015.008.0029", mcrit)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
}
@@ -703,7 +702,7 @@
// Check that each of the values are the same type as expression
Class exprType = scrit.getExpression().getType();
if(exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, scrit.getExpression()));
+ throw new QueryResolverException("ERR.015.008.0030",
QueryPlugin.Util.getString("ERR.015.008.0030", scrit.getExpression()));
//$NON-NLS-1$ //$NON-NLS-2$
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
@@ -744,9 +743,9 @@
while(valIter.hasNext()) {
Expression value = (Expression) valIter.next();
if(value.getType() == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, value));
+ throw new QueryResolverException("ERR.015.008.0030",
QueryPlugin.Util.getString("ERR.015.008.0030", value)); //$NON-NLS-1$
//$NON-NLS-2$
} else if(! value.getType().equals(setType)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0031,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0031, scrit));
+ throw new QueryResolverException("ERR.015.008.0031",
QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -754,7 +753,7 @@
scrit.setExpression(ResolverUtil.convertExpression(scrit.getExpression(),
exprTypeName, setTypeName, metadata));
} else {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0031,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0031, scrit));
+ throw new QueryResolverException("ERR.015.008.0031",
QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -828,11 +827,11 @@
// 3. Perform implicit type conversions
String whenTypeName = ResolverUtil.getCommonType((String[])whenTypeNames.toArray(new
String[whenTypeNames.size()]));
if (whenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "WHEN", obj));
//$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068",
QueryPlugin.Util.getString("ERR.015.008.0068", "WHEN", obj));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new
String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "THEN/ELSE", obj));
//$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068",
QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), whenTypeName,
metadata));
ArrayList whens = new ArrayList(whenCount);
@@ -918,7 +917,7 @@
// 3. Perform implicit type conversions
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new
String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068,
QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "THEN/ELSE", obj));
//$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068",
QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj));
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
ArrayList thens = new ArrayList(whenCount);
for (int i = 0; i < whenCount; i++) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -150,7 +150,6 @@
import org.teiid.query.sql.visitor.PredicateCollectorVisitor;
import org.teiid.query.sql.visitor.EvaluatableVisitor.EvaluationLevel;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.translator.SourceSystemFunctions;
@@ -590,7 +589,7 @@
try {
ResolverVisitor.resolveLanguageObject(translatedCriteria, metadata);
} catch(TeiidException ex) {
- throw new QueryValidatorException(ex, ErrorMessageKeys.REWRITER_0002,
QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0002, translatedCriteria));
+ throw new QueryValidatorException(ex, "ERR.015.009.0002",
QueryExecPlugin.Util.getString("ERR.015.009.0002", translatedCriteria));
//$NON-NLS-1$ //$NON-NLS-2$
}
return translatedCriteria;
@@ -1168,7 +1167,7 @@
return FALSE_CRITERIA;
} catch(ExpressionEvaluationException e) {
- throw new QueryValidatorException(e, ErrorMessageKeys.REWRITER_0001,
QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0001, crit));
+ throw new QueryValidatorException(e, "ERR.015.009.0001",
QueryExecPlugin.Util.getString("ERR.015.009.0001", crit)); //$NON-NLS-1$
//$NON-NLS-2$
}
}
@@ -1383,7 +1382,7 @@
Object result = descriptor.invokeFunction(new Object[] {
const2.getValue(), const1.getValue() } );
combinedConst = new Constant(result, descriptor.getReturnType());
} catch(FunctionExecutionException e) {
- throw new QueryValidatorException(e, ErrorMessageKeys.REWRITER_0003,
QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0003, e.getMessage()));
+ throw new QueryValidatorException(e, "ERR.015.009.0003",
QueryExecPlugin.Util.getString("ERR.015.009.0003", e.getMessage()));
//$NON-NLS-1$ //$NON-NLS-2$
}
} else {
Function conversion = new Function(descriptor.getName(), new Expression[] {
rightExpr, const1 });
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -24,7 +24,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.Expression;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* <p>The common functionality of a {@link CompareCriteria} and a
@@ -79,7 +78,7 @@
*/
public void setOperator( int operator ) {
if (operator < EQ || operator > GE) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0001,
operator));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0001",
operator)); //$NON-NLS-1$
}
this.operator = operator;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -30,7 +30,6 @@
import org.teiid.core.util.HashCodeUtil;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -128,7 +127,7 @@
*/
public void setOperator(int operator) {
if (!isValidOperator(operator)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0002,
operator));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0002",
operator)); //$NON-NLS-1$
}
this.operator = operator;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java 2010-09-08
16:07:43 UTC (rev 2545)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -34,7 +34,6 @@
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -105,7 +104,7 @@
*/
public void replaceSymbols( Collection symbols ) {
if(symbols == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0003));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0003"));
//$NON-NLS-1$
}
this.symbols = new ArrayList(symbols);
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -33,7 +33,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -126,7 +125,7 @@
public void setParameterType(int parameterType){
// validate against above types
if(parameterType < ParameterInfo.IN || parameterType >
ParameterInfo.RESULT_SET) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0006,
parameterType));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0006",
parameterType)); //$NON-NLS-1$
}
this.parameterType = parameterType;
}
@@ -244,7 +243,7 @@
*/
public ElementSymbol getResultSetColumn(int position){
if(resultSetColumns == null){
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0009));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0009"));
//$NON-NLS-1$
}
//position is 1 based
@@ -252,7 +251,7 @@
if(position >= 0 && position < resultSetColumns.size()) {
return (ElementSymbol) resultSetColumns.get(position);
}
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0010, new
Integer(position + 1)));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0010", new
Integer(position + 1))); //$NON-NLS-1$
}
/**
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -39,7 +39,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -149,7 +148,7 @@
*/
public void setParameter(SPParameter parameter){
if(parameter == null){
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0011));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0011"));
//$NON-NLS-1$
}
Integer key = new Integer(parameter.getIndex());
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -25,7 +25,6 @@
import org.teiid.core.util.Assertion;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -74,7 +73,7 @@
*/
public void setSymbol(SingleElementSymbol symbol) {
if(symbol instanceof AliasSymbol || symbol == null){
- Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0029));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.010.0029"));
//$NON-NLS-1$
}
this.symbol = symbol;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class CaseExpression extends AbstractCaseExpression {
@@ -68,7 +67,7 @@
*/
public void setExpression(Expression expr) {
if (expr == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0035));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0035"));
//$NON-NLS-1$
}
this.expression = expr;
}
@@ -106,18 +105,18 @@
*/
public void setWhen(List when, List then) {
if (when == null || then == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036"));
//$NON-NLS-1$
}
if (when.size() != then.size() ||
when.size() < 1) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036"));
//$NON-NLS-1$
}
for (int i = 0 ; i < when.size(); i++) {
if (!(when.get(i) instanceof Expression)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0037));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0037"));
//$NON-NLS-1$
}
if (!(then.get(i) instanceof Expression)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0038));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0038"));
//$NON-NLS-1$
}
}
if (this.when != when) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -58,10 +57,10 @@
// Check that type is valid, then set it
if(type == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0014));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0014"));
//$NON-NLS-1$
}
if(! DataTypeManager.getAllDataTypeClasses().contains(type)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0015,
type.getName()));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0015",
type.getName())); //$NON-NLS-1$
}
assert value == null || type.isAssignableFrom(value.getClass()) : "Invalid
value for specified type."; //$NON-NLS-1$
this.type = type;
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -24,7 +24,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* <p>This is the server's representation of a metadata group symbol. The
group
@@ -132,7 +131,7 @@
*/
public void setMetadataID(Object metadataID) {
if(metadataID == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0016));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0016"));
//$NON-NLS-1$
}
this.metadataID = metadataID;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -29,7 +29,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.lang.Criteria;
-import org.teiid.query.util.ErrorMessageKeys;
public class SearchedCaseExpression extends AbstractCaseExpression {
@@ -81,18 +80,18 @@
*/
public void setWhen(List when, List then) {
if (when == null || then == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036"));
//$NON-NLS-1$
}
if (when.size() != then.size() ||
when.size() < 1) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036"));
//$NON-NLS-1$
}
for (int i = 0 ; i < when.size(); i++) {
if (!(when.get(i) instanceof Criteria)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0039));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0039"));
//$NON-NLS-1$
}
if (!(then.get(i) instanceof Expression)) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0038));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0038"));
//$NON-NLS-1$
}
}
if (this.when != when) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java 2010-09-08
16:07:43 UTC (rev 2545)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -26,7 +26,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageObject;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -91,7 +90,7 @@
*/
public void setName(String name) {
if(name == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0017));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0017"));
//$NON-NLS-1$
}
this.name = name;
this.outputName = null;
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.proc.*;
import org.teiid.query.sql.symbol.*;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.validator.UpdateValidationVisitor;
import org.teiid.query.validator.ValidatorReport;
@@ -164,7 +163,7 @@
throws TeiidComponentException, QueryMetadataException{
if(physicalElements.size()!= virtualElements.size()) {
- throw new QueryMetadataException(ErrorMessageKeys.SQL_0018,
QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0018));
+ throw new QueryMetadataException("ERR.015.010.0018",
QueryPlugin.Util.getString("ERR.015.010.0018")); //$NON-NLS-1$ //$NON-NLS-2$
}
//match the physical group elements to the virtual group elements
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -28,7 +28,6 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public class VariableContext {
@@ -66,7 +65,7 @@
}
Object value = variableMap.get(variable);
if (value == null && !variableMap.containsKey(variable)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, variable, "No value was
available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033",
QueryPlugin.Util.getString("ERR.015.006.0033", variable, "No value was
available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return value;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.symbol.AllInGroupSymbol;
import org.teiid.query.sql.symbol.AllSymbol;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -60,7 +59,7 @@
*/
public ElementCollectorVisitor(Collection<ElementSymbol> elements) {
if(elements == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0021));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0021"));
//$NON-NLS-1$
}
this.elements = elements;
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -32,7 +32,6 @@
import org.teiid.query.sql.navigator.DeepPreOrderNavigator;
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.symbol.Function;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -71,7 +70,7 @@
*/
public FunctionCollectorVisitor(Collection functions, String functionName) {
if(functions == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0022));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0022"));
//$NON-NLS-1$
}
this.functions = functions;
this.functionName = functionName;
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.navigator.DeepPreOrderNavigator;
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.symbol.GroupSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -66,7 +65,7 @@
*/
public GroupCollectorVisitor(Collection<GroupSymbol> groups) {
if(groups == null) {
- throw new
IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0023));
+ throw new
IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0023"));
//$NON-NLS-1$
}
this.groups = groups;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/util/CommandContext.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/util/CommandContext.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/util/CommandContext.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -401,11 +401,11 @@
public Object getFromContext(Expression expression) throws TeiidComponentException {
if (variableContext == null || !(expression instanceof ElementSymbol)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was
available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033",
QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was
available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
Object value = variableContext.getValue((ElementSymbol)expression);
if (value == null &&
!variableContext.containsVariable((ElementSymbol)expression)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033,
QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was
available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033",
QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was
available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return value;
}
Deleted: branches/7.1.x/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -1,409 +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.
- */
-
-/*
- * Date: Apr 3, 2003
- * Time: 11:01:10 AM
- */
-package org.teiid.query.util;
-
-/**
- * LogMessageKeys.
- *
- * <p>Error messages for query project (015) to address
internationalization.</p>
- *
- */
-public class ErrorMessageKeys {
-
- /** function package (001) */
- public static final String FUNCTION_0001 = "ERR.015.001.0001";
//$NON-NLS-1$
- public static final String FUNCTION_0002 = "ERR.015.001.0002"; //$NON-NLS-1$
- public static final String FUNCTION_0003 = "ERR.015.001.0003"; //$NON-NLS-1$
- public static final String FUNCTION_0004 = "ERR.015.001.0004"; //$NON-NLS-1$
- public static final String FUNCTION_0005 = "ERR.015.001.0005"; //$NON-NLS-1$
- public static final String FUNCTION_0006 = "ERR.015.001.0006"; //$NON-NLS-1$
- public static final String FUNCTION_0007 = "ERR.015.001.0007"; //$NON-NLS-1$
- public static final String FUNCTION_0008 = "ERR.015.001.0008"; //$NON-NLS-1$
- public static final String FUNCTION_0009 = "ERR.015.001.0009"; //$NON-NLS-1$
- public static final String FUNCTION_0010 = "ERR.015.001.0010"; //$NON-NLS-1$
- public static final String FUNCTION_0011 = "ERR.015.001.0011"; //$NON-NLS-1$
- public static final String FUNCTION_0012 = "ERR.015.001.0012"; //$NON-NLS-1$
- public static final String FUNCTION_0013 = "ERR.015.001.0013"; //$NON-NLS-1$
- public static final String FUNCTION_0014 = "ERR.015.001.0014"; //$NON-NLS-1$
- public static final String FUNCTION_0015 = "ERR.015.001.0015"; //$NON-NLS-1$
- public static final String FUNCTION_0016 = "ERR.015.001.0016"; //$NON-NLS-1$
- public static final String FUNCTION_0017 = "ERR.015.001.0017"; //$NON-NLS-1$
- public static final String FUNCTION_0018 = "ERR.015.001.0018"; //$NON-NLS-1$
- public static final String FUNCTION_0019 = "ERR.015.001.0019"; //$NON-NLS-1$
- public static final String FUNCTION_0020 = "ERR.015.001.0020"; //$NON-NLS-1$
- public static final String FUNCTION_0021 = "ERR.015.001.0021"; //$NON-NLS-1$
- public static final String FUNCTION_0022 = "ERR.015.001.0022"; //$NON-NLS-1$
- public static final String FUNCTION_0024 = "ERR.015.001.0024"; //$NON-NLS-1$
- public static final String FUNCTION_0025 = "ERR.015.001.0025"; //$NON-NLS-1$
- public static final String FUNCTION_0026 = "ERR.015.001.0026"; //$NON-NLS-1$
- public static final String FUNCTION_0027 = "ERR.015.001.0027"; //$NON-NLS-1$
- public static final String FUNCTION_0028 = "ERR.015.001.0028"; //$NON-NLS-1$
- public static final String FUNCTION_0029 = "ERR.015.001.0029"; //$NON-NLS-1$
- public static final String FUNCTION_0030 = "ERR.015.001.0030"; //$NON-NLS-1$
- public static final String FUNCTION_0031 = "ERR.015.001.0031"; //$NON-NLS-1$
- public static final String FUNCTION_0032 = "ERR.015.001.0032"; //$NON-NLS-1$
- public static final String FUNCTION_0033 = "ERR.015.001.0033"; //$NON-NLS-1$
- public static final String FUNCTION_0034 = "ERR.015.001.0034"; //$NON-NLS-1$
- public static final String FUNCTION_0035 = "ERR.015.001.0035"; //$NON-NLS-1$
- public static final String FUNCTION_0035a = "ERR.015.001.0035a";
//$NON-NLS-1$
- public static final String FUNCTION_0036 = "ERR.015.001.0036"; //$NON-NLS-1$
- public static final String FUNCTION_0037 = "ERR.015.001.0037"; //$NON-NLS-1$
- public static final String FUNCTION_0038 = "ERR.015.001.0038"; //$NON-NLS-1$
- public static final String FUNCTION_0039 = "ERR.015.001.0039"; //$NON-NLS-1$
- public static final String FUNCTION_0040 = "ERR.015.001.0040"; //$NON-NLS-1$
- public static final String FUNCTION_0041 = "ERR.015.001.0041"; //$NON-NLS-1$
- public static final String FUNCTION_0042 = "ERR.015.001.0042"; //$NON-NLS-1$
- public static final String FUNCTION_0043 = "ERR.015.001.0043"; //$NON-NLS-1$
- public static final String FUNCTION_0044 = "ERR.015.001.0044"; //$NON-NLS-1$
- public static final String FUNCTION_0045 = "ERR.015.001.0045"; //$NON-NLS-1$
- public static final String FUNCTION_0046 = "ERR.015.001.0046"; //$NON-NLS-1$
- public static final String FUNCTION_0047 = "ERR.015.001.0047"; //$NON-NLS-1$
- public static final String FUNCTION_0048 = "ERR.015.001.0048"; //$NON-NLS-1$
- public static final String FUNCTION_0050 = "ERR.015.001.0050"; //$NON-NLS-1$
- public static final String FUNCTION_0051 = "ERR.015.001.0051"; //$NON-NLS-1$
- public static final String FUNCTION_0052 = "ERR.015.001.0052"; //$NON-NLS-1$
- public static final String FUNCTION_0053 = "ERR.015.001.0053"; //$NON-NLS-1$
- public static final String FUNCTION_0054 = "ERR.015.001.0054"; //$NON-NLS-1$
- public static final String FUNCTION_0055 = "ERR.015.001.0055"; //$NON-NLS-1$
- public static final String FUNCTION_0056 = "ERR.015.001.0056"; //$NON-NLS-1$
- public static final String FUNCTION_0057 = "ERR.015.001.0057"; //$NON-NLS-1$
- public static final String FUNCTION_0058 = "ERR.015.001.0058"; //$NON-NLS-1$
- public static final String FUNCTION_0059 = "ERR.015.001.0059"; //$NON-NLS-1$
- public static final String FUNCTION_0060 = "ERR.015.001.0060"; //$NON-NLS-1$
- public static final String FUNCTION_0061 = "ERR.015.001.0061"; //$NON-NLS-1$
- public static final String FUNCTION_0062 = "ERR.015.001.0062"; //$NON-NLS-1$
- public static final String FUNCTION_0063 = "ERR.015.001.0063"; //$NON-NLS-1$
- public static final String FUNCTION_0064 = "ERR.015.001.0064"; //$NON-NLS-1$
- public static final String FUNCTION_0065 = "ERR.015.001.0065"; //$NON-NLS-1$
- public static final String FUNCTION_0066 = "ERR.015.001.0066"; //$NON-NLS-1$
- public static final String FUNCTION_0067 = "ERR.015.001.0067"; //$NON-NLS-1$
- public static final String FUNCTION_0068 = "ERR.015.001.0068";
//$NON-NLS-1$
- public static final String FUNCTION_0069 = "ERR.015.001.0069";
//$NON-NLS-1$
- public static final String FUNCTION_0070 = "ERR.015.001.0070";
//$NON-NLS-1$
- public static final String FUNCTION_0071 = "ERR.015.001.0071";
//$NON-NLS-1$
-
- /** mapping package (002) */
- public static final String MAPPING_0008 = "ERR.015.002.0008"; //$NON-NLS-1$
- public static final String MAPPING_0009 = "ERR.015.002.0009"; //$NON-NLS-1$
- public static final String MAPPING_0010 = "ERR.015.002.0010"; //$NON-NLS-1$
- public static final String MAPPING_0011 = "ERR.015.002.0011"; //$NON-NLS-1$
- public static final String MAPPING_0012 = "ERR.015.002.0012"; //$NON-NLS-1$
-
- /** optimizer package (004) */
- public static final String OPTIMIZER_0002 = "ERR.015.004.0002";
//$NON-NLS-1$
- public static final String OPTIMIZER_0005 = "ERR.015.004.0005";
//$NON-NLS-1$
- public static final String OPTIMIZER_0006 = "ERR.015.004.0006";
//$NON-NLS-1$
- public static final String OPTIMIZER_0007 = "ERR.015.004.0007";
//$NON-NLS-1$
- public static final String OPTIMIZER_0008 = "ERR.015.004.0008";
//$NON-NLS-1$
- public static final String OPTIMIZER_0009 = "ERR.015.004.0009";
//$NON-NLS-1$
- public static final String OPTIMIZER_0010 = "ERR.015.004.0010";
//$NON-NLS-1$
- public static final String OPTIMIZER_0011 = "ERR.015.004.0011";
//$NON-NLS-1$
- public static final String OPTIMIZER_0012 = "ERR.015.004.0012";
//$NON-NLS-1$
- public static final String OPTIMIZER_0014 = "ERR.015.004.0014";
//$NON-NLS-1$
- public static final String OPTIMIZER_0015 = "ERR.015.004.0015";
//$NON-NLS-1$
- public static final String OPTIMIZER_0016 = "ERR.015.004.0016";
//$NON-NLS-1$
- public static final String OPTIMIZER_0017 = "ERR.015.004.0017";
//$NON-NLS-1$
- public static final String OPTIMIZER_0019 = "ERR.015.004.0019";
//$NON-NLS-1$
- public static final String OPTIMIZER_0020 = "ERR.015.004.0020";
//$NON-NLS-1$
- public static final String OPTIMIZER_0021 = "ERR.015.004.0021";
//$NON-NLS-1$
- public static final String OPTIMIZER_0023 = "ERR.015.004.0023";
//$NON-NLS-1$
- public static final String OPTIMIZER_0024 = "ERR.015.004.0024";
//$NON-NLS-1$
- public static final String OPTIMIZER_0026 = "ERR.015.004.0026";
//$NON-NLS-1$
- public static final String OPTIMIZER_0029 = "ERR.015.004.0029";
//$NON-NLS-1$
- public static final String OPTIMIZER_0033 = "ERR.015.004.0033";
//$NON-NLS-1$
- public static final String OPTIMIZER_0034 = "ERR.015.004.0034";
//$NON-NLS-1$
- public static final String OPTIMIZER_0035 = "ERR.015.004.0035";
//$NON-NLS-1$
- public static final String OPTIMIZER_0036 = "ERR.015.004.0036";
//$NON-NLS-1$
- public static final String OPTIMIZER_0037 = "ERR.015.004.0037";
//$NON-NLS-1$
- public static final String OPTIMIZER_0038 = "ERR.015.004.0038";
//$NON-NLS-1$
- public static final String OPTIMIZER_0040 = "ERR.015.004.0040";
//$NON-NLS-1$
- public static final String OPTIMIZER_0041 = "ERR.015.004.0041";
//$NON-NLS-1$
- public static final String OPTIMIZER_0042 = "ERR.015.004.0042";
//$NON-NLS-1$
- public static final String OPTIMIZER_0043 = "ERR.015.004.0043";
//$NON-NLS-1$
- public static final String OPTIMIZER_0044 = "ERR.015.004.0044";
//$NON-NLS-1$
- public static final String OPTIMIZER_0045 = "ERR.015.004.0045";
//$NON-NLS-1$
- public static final String OPTIMIZER_0046 = "ERR.015.004.0046";
//$NON-NLS-1$
- public static final String OPTIMIZER_0047 = "ERR.015.004.0047";
//$NON-NLS-1$
- public static final String OPTIMIZER_0048 = "ERR.015.004.0048";
//$NON-NLS-1$
- public static final String OPTIMIZER_0051 = "ERR.015.004.0051";
//$NON-NLS-1$
- public static final String OPTIMIZER_0053 = "ERR.015.004.0053";
//$NON-NLS-1$
- public static final String OPTIMIZER_0054 = "ERR.015.004.0054";
//$NON-NLS-1$
- public static final String OPTIMIZER_0055 = "ERR.015.004.0055";
//$NON-NLS-1$
- public static final String OPTIMIZER_0056 = "ERR.015.004.0056";
//$NON-NLS-1$
- public static final String OPTIMIZER_0057 = "ERR.015.004.0057";
//$NON-NLS-1$
- public static final String OPTIMIZER_0058 = "ERR.015.004.0058";
//$NON-NLS-1$
- public static final String OPTIMIZER_0059 = "ERR.015.004.0059";
//$NON-NLS-1$
- public static final String OPTIMIZER_0060 = "ERR.015.004.0060";
//$NON-NLS-1$
- public static final String OPTIMIZER_0061 = "ERR.015.004.0061";
//$NON-NLS-1$
- public static final String OPTIMIZER_0063 = "ERR.015.004.0063";
//$NON-NLS-1$
- public static final String OPTIMIZER_0064 = "ERR.015.004.0064"; //$NON-NLS-1$
- public static final String OPTIMIZER_0066 = "ERR.015.004.0066";
//$NON-NLS-1$
- public static final String OPTIMIZER_0067 = "ERR.015.004.0067";
//$NON-NLS-1$
- public static final String OPTIMIZER_0068 = "ERR.015.004.0068";
//$NON-NLS-1$
- public static final String OPTIMIZER_0069 = "ERR.015.004.0069";
//$NON-NLS-1$
- public static final String OPTIMIZER_0070 = "ERR.015.004.0070";
//$NON-NLS-1$
- public static final String OPTIMIZER_0071 = "ERR.015.004.0071";
//$NON-NLS-1$
-
- /** processor package (006) */
- public static final String PROCESSOR_0001 = "ERR.015.006.0001";
//$NON-NLS-1$
- public static final String PROCESSOR_0003 = "ERR.015.006.0003";
//$NON-NLS-1$
- public static final String PROCESSOR_0010 = "ERR.015.006.0010";
//$NON-NLS-1$
- public static final String PROCESSOR_0011 = "ERR.015.006.0011";
//$NON-NLS-1$
- public static final String PROCESSOR_0012 = "ERR.015.006.0012";
//$NON-NLS-1$
- public static final String PROCESSOR_0014 = "ERR.015.006.0014";
//$NON-NLS-1$
- public static final String PROCESSOR_0015 = "ERR.015.006.0015";
//$NON-NLS-1$
- public static final String PROCESSOR_0016 = "ERR.015.006.0016";
//$NON-NLS-1$
- public static final String PROCESSOR_0017 = "ERR.015.006.0017";
//$NON-NLS-1$
- public static final String PROCESSOR_0019 = "ERR.015.006.0019";
//$NON-NLS-1$
- public static final String PROCESSOR_0020 = "ERR.015.006.0020";
//$NON-NLS-1$
- public static final String PROCESSOR_0021 = "ERR.015.006.0021";
//$NON-NLS-1$
- public static final String PROCESSOR_0022 = "ERR.015.006.0022";
//$NON-NLS-1$
- public static final String PROCESSOR_0023 = "ERR.015.006.0023";
//$NON-NLS-1$
- public static final String PROCESSOR_0024 = "ERR.015.006.0024";
//$NON-NLS-1$
- public static final String PROCESSOR_0025 = "ERR.015.006.0025";
//$NON-NLS-1$
- public static final String PROCESSOR_0026 = "ERR.015.006.0026";
//$NON-NLS-1$
- public static final String PROCESSOR_0027 = "ERR.015.006.0027";
//$NON-NLS-1$
- public static final String PROCESSOR_0029 = "ERR.015.006.0029";
//$NON-NLS-1$
- public static final String PROCESSOR_0032 = "ERR.015.006.0032";
//$NON-NLS-1$
- public static final String PROCESSOR_0033 = "ERR.015.006.0033";
//$NON-NLS-1$
- public static final String PROCESSOR_0034 = "ERR.015.006.0034";
//$NON-NLS-1$
- public static final String PROCESSOR_0035 = "ERR.015.006.0035";
//$NON-NLS-1$
- public static final String PROCESSOR_0037 = "ERR.015.006.0037";
//$NON-NLS-1$
- public static final String PROCESSOR_0038 = "ERR.015.006.0038";
//$NON-NLS-1$
- public static final String PROCESSOR_0039 = "ERR.015.006.0039";
//$NON-NLS-1$
- public static final String PROCESSOR_0040 = "ERR.015.006.0040";
//$NON-NLS-1$
- public static final String PROCESSOR_0041 = "ERR.015.006.0041";
//$NON-NLS-1$
- public static final String PROCESSOR_0042 = "ERR.015.006.0042";
//$NON-NLS-1$
- public static final String PROCESSOR_0046 = "ERR.015.006.0046";
//$NON-NLS-1$
- public static final String PROCESSOR_0047 = "ERR.015.006.0047";
//$NON-NLS-1$
- public static final String PROCESSOR_0048 = "ERR.015.006.0048";
//$NON-NLS-1$
- public static final String PROCESSOR_0049 = "ERR.015.006.0049";
//$NON-NLS-1$
- public static final String PROCESSOR_0050 = "ERR.015.006.0050";
//$NON-NLS-1$
- public static final String PROCESSOR_0051 = "ERR.015.006.0051";
//$NON-NLS-1$
- public static final String PROCESSOR_0052 = "ERR.015.006.0052";
//$NON-NLS-1$
- public static final String PROCESSOR_0054 = "ERR.015.006.0054";
//$NON-NLS-1$
- public static final String PROCESSOR_0055 = "ERR.015.006.0055";
//$NON-NLS-1$
- public static final String PROCESSOR_0056 = "ERR.015.006.0056";
//$NON-NLS-1$
- public static final String PROCESSOR_0057 = "ERR.015.006.0057";
//$NON-NLS-1$
- public static final String PROCESSOR_0058 = "ERR.015.006.0058";
//$NON-NLS-1$
- public static final String PROCESSOR_0060 = "ERR.015.006.0060";
//$NON-NLS-1$
- public static final String PROCESSOR_0061 = "ERR.015.006.0061";
//$NON-NLS-1$
-
- /** report package (007) */
- public static final String REPORT_0001 = "ERR.015.007.0001"; //$NON-NLS-1$
-
- /** resolver package (008) */
- public static final String RESOLVER_0001 = "ERR.015.008.0001";
//$NON-NLS-1$
- public static final String RESOLVER_0002 = "ERR.015.008.0002";
//$NON-NLS-1$
- public static final String RESOLVER_0003 = "ERR.015.008.0003";
//$NON-NLS-1$
- public static final String RESOLVER_0004 = "ERR.015.008.0004";
//$NON-NLS-1$
- public static final String RESOLVER_0005 = "ERR.015.008.0005";
//$NON-NLS-1$
- public static final String RESOLVER_0006 = "ERR.015.008.0006";
//$NON-NLS-1$
- public static final String RESOLVER_0007 = "ERR.015.008.0007";
//$NON-NLS-1$
- public static final String RESOLVER_0008 = "ERR.015.008.0008";
//$NON-NLS-1$
- public static final String RESOLVER_0009 = "ERR.015.008.0009";
//$NON-NLS-1$
- public static final String RESOLVER_0010 = "ERR.015.008.0010";
//$NON-NLS-1$
- public static final String RESOLVER_0011 = "ERR.015.008.0011";
//$NON-NLS-1$
- public static final String RESOLVER_0012 = "ERR.015.008.0012";
//$NON-NLS-1$
- public static final String RESOLVER_0013 = "ERR.015.008.0013";
//$NON-NLS-1$
- public static final String RESOLVER_0014 = "ERR.015.008.0014";
//$NON-NLS-1$
- public static final String RESOLVER_0015 = "ERR.015.008.0015";
//$NON-NLS-1$
- public static final String RESOLVER_0016 = "ERR.015.008.0016";
//$NON-NLS-1$
- public static final String RESOLVER_0017 = "ERR.015.008.0017";
//$NON-NLS-1$
- public static final String RESOLVER_0018 = "ERR.015.008.0018";
//$NON-NLS-1$
- public static final String RESOLVER_0019 = "ERR.015.008.0019";
//$NON-NLS-1$
- public static final String RESOLVER_0020 = "ERR.015.008.0020";
//$NON-NLS-1$
- public static final String RESOLVER_0021 = "ERR.015.008.0021";
//$NON-NLS-1$
- public static final String RESOLVER_0022 = "ERR.015.008.0022";
//$NON-NLS-1$
- public static final String RESOLVER_0023 = "ERR.015.008.0023";
//$NON-NLS-1$
- public static final String RESOLVER_0024 = "ERR.015.008.0024";
//$NON-NLS-1$
- public static final String RESOLVER_0025 = "ERR.015.008.0025";
//$NON-NLS-1$
- public static final String RESOLVER_0026 = "ERR.015.008.0026";
//$NON-NLS-1$
- public static final String RESOLVER_0027 = "ERR.015.008.0027";
//$NON-NLS-1$
- public static final String RESOLVER_0028 = "ERR.015.008.0028";
//$NON-NLS-1$
- public static final String RESOLVER_0029 = "ERR.015.008.0029";
//$NON-NLS-1$
- public static final String RESOLVER_0030 = "ERR.015.008.0030";
//$NON-NLS-1$
- public static final String RESOLVER_0031 = "ERR.015.008.0031";
//$NON-NLS-1$
- public static final String RESOLVER_0032 = "ERR.015.008.0032";
//$NON-NLS-1$
- public static final String RESOLVER_0033 = "ERR.015.008.0033";
//$NON-NLS-1$
- public static final String RESOLVER_0034 = "ERR.015.008.0034";
//$NON-NLS-1$
- public static final String RESOLVER_0035 = "ERR.015.008.0035";
//$NON-NLS-1$
- public static final String RESOLVER_0036 = "ERR.015.008.0036";
//$NON-NLS-1$
- public static final String RESOLVER_0037 = "ERR.015.008.0037";
//$NON-NLS-1$
- public static final String RESOLVER_0038 = "ERR.015.008.0038";
//$NON-NLS-1$
- public static final String RESOLVER_0039 = "ERR.015.008.0039";
//$NON-NLS-1$
- public static final String RESOLVER_0040 = "ERR.015.008.0040";
//$NON-NLS-1$
- public static final String RESOLVER_0041 = "ERR.015.008.0041";
//$NON-NLS-1$
- public static final String RESOLVER_0042 = "ERR.015.008.0042";
//$NON-NLS-1$
- public static final String RESOLVER_0043 = "ERR.015.008.0043";
//$NON-NLS-1$
- public static final String RESOLVER_0044 = "ERR.015.008.0044";
//$NON-NLS-1$
- public static final String RESOLVER_0045 = "ERR.015.008.0045";
//$NON-NLS-1$
- public static final String RESOLVER_0046 = "ERR.015.008.0046";
//$NON-NLS-1$
- public static final String RESOLVER_0047 = "ERR.015.008.0047";
//$NON-NLS-1$
- public static final String RESOLVER_0048 = "ERR.015.008.0048";
//$NON-NLS-1$
- public static final String RESOLVER_0049 = "ERR.015.008.0049";
//$NON-NLS-1$
- public static final String RESOLVER_0050 = "ERR.015.008.0050";
//$NON-NLS-1$
- public static final String RESOLVER_0051 = "ERR.015.008.0051";
//$NON-NLS-1$
- public static final String RESOLVER_0052 = "ERR.015.008.0052";
//$NON-NLS-1$
- public static final String RESOLVER_0053 = "ERR.015.008.0053";
//$NON-NLS-1$
- public static final String RESOLVER_0054 = "ERR.015.008.0054";
//$NON-NLS-1$
- public static final String RESOLVER_0055 = "ERR.015.008.0055";
//$NON-NLS-1$
- public static final String RESOLVER_0056 = "ERR.015.008.0056";
//$NON-NLS-1$
- public static final String RESOLVER_0057 = "ERR.015.008.0057";
//$NON-NLS-1$
- public static final String RESOLVER_0058 = "ERR.015.008.0058";
//$NON-NLS-1$
- public static final String RESOLVER_0059 = "ERR.015.008.0059";
//$NON-NLS-1$
- public static final String RESOLVER_0060 = "ERR.015.008.0060";
//$NON-NLS-1$
- public static final String RESOLVER_0061 = "ERR.015.008.0061";
//$NON-NLS-1$
- public static final String RESOLVER_0062 = "ERR.015.008.0062";
//$NON-NLS-1$
- public static final String RESOLVER_0063 = "ERR.015.008.0063";
//$NON-NLS-1$
- public static final String RESOLVER_0064 = "ERR.015.008.0064";
//$NON-NLS-1$
- public static final String RESOLVER_0065 = "ERR.015.008.0065"; //$NON-NLS-1$
- public static final String RESOLVER_0066 = "ERR.015.008.0066";
//$NON-NLS-1$
- public static final String RESOLVER_0067 = "ERR.015.008.0067";
//$NON-NLS-1$
- public static final String RESOLVER_0068 = "ERR.015.008.0068";
//$NON-NLS-1$
- public static final String RESOLVER_0069 = "ERR.015.008.0069";
//$NON-NLS-1$
- public static final String RESOLVER_0070 = "ERR.015.008.0070";
//$NON-NLS-1$
-
- /** rewriter package (009) */
- public static final String REWRITER_0001 = "ERR.015.009.0001";
//$NON-NLS-1$
- public static final String REWRITER_0002 = "ERR.015.009.0002";
//$NON-NLS-1$
- public static final String REWRITER_0003 = "ERR.015.009.0003";
//$NON-NLS-1$
- public static final String REWRITER_0004 = "ERR.015.009.0004";
//$NON-NLS-1$
- public static final String REWRITER_0005 = "ERR.015.009.0005";
//$NON-NLS-1$
-
- /** sql package (010) */
- public static final String SQL_0001 = "ERR.015.010.0001"; //$NON-NLS-1$
- public static final String SQL_0002 = "ERR.015.010.0002"; //$NON-NLS-1$
- public static final String SQL_0003 = "ERR.015.010.0003"; //$NON-NLS-1$
- public static final String SQL_0004 = "ERR.015.010.0004"; //$NON-NLS-1$
- public static final String SQL_0005 = "ERR.015.010.0005"; //$NON-NLS-1$
- public static final String SQL_0006 = "ERR.015.010.0006"; //$NON-NLS-1$
- public static final String SQL_0007 = "ERR.015.010.0007"; //$NON-NLS-1$
- public static final String SQL_0008 = "ERR.015.010.0008"; //$NON-NLS-1$
- public static final String SQL_0009 = "ERR.015.010.0009"; //$NON-NLS-1$
- public static final String SQL_0010 = "ERR.015.010.0010"; //$NON-NLS-1$
- public static final String SQL_0011 = "ERR.015.010.0011"; //$NON-NLS-1$
- public static final String SQL_0012 = "ERR.015.010.0012"; //$NON-NLS-1$
- public static final String SQL_0013 = "ERR.015.010.0013"; //$NON-NLS-1$
- public static final String SQL_0014 = "ERR.015.010.0014"; //$NON-NLS-1$
- public static final String SQL_0015 = "ERR.015.010.0015"; //$NON-NLS-1$
- public static final String SQL_0016 = "ERR.015.010.0016"; //$NON-NLS-1$
- public static final String SQL_0017 = "ERR.015.010.0017"; //$NON-NLS-1$
- public static final String SQL_0018 = "ERR.015.010.0018"; //$NON-NLS-1$
- public static final String SQL_0019 = "ERR.015.010.0019"; //$NON-NLS-1$
- public static final String SQL_0020 = "ERR.015.010.0020"; //$NON-NLS-1$
- public static final String SQL_0021 = "ERR.015.010.0021"; //$NON-NLS-1$
- public static final String SQL_0022 = "ERR.015.010.0022"; //$NON-NLS-1$
- public static final String SQL_0023 = "ERR.015.010.0023"; //$NON-NLS-1$
- public static final String SQL_0024 = "ERR.015.010.0024"; //$NON-NLS-1$
- public static final String SQL_0025 = "ERR.015.010.0025"; //$NON-NLS-1$
- public static final String SQL_0026 = "ERR.015.010.0026"; //$NON-NLS-1$
- public static final String SQL_0027 = "ERR.015.010.0027"; //$NON-NLS-1$
- public static final String SQL_0028 = "ERR.015.010.0028"; //$NON-NLS-1$
- public static final String SQL_0029 = "ERR.015.010.0029"; //$NON-NLS-1$
- public static final String SQL_0030 = "ERR.015.010.0030"; //$NON-NLS-1$
- public static final String SQL_0031 = "ERR.015.010.0031"; //$NON-NLS-1$
- public static final String SQL_0032 = "ERR.015.010.0032"; //$NON-NLS-1$
- public static final String SQL_0034 = "ERR.015.010.0034"; //$NON-NLS-1$
- public static final String SQL_0035 = "ERR.015.010.0035"; //$NON-NLS-1$
- public static final String SQL_0036 = "ERR.015.010.0036"; //$NON-NLS-1$
- public static final String SQL_0037 = "ERR.015.010.0037"; //$NON-NLS-1$
- public static final String SQL_0038 = "ERR.015.010.0038"; //$NON-NLS-1$
- public static final String SQL_0039 = "ERR.015.010.0039"; //$NON-NLS-1$
-
- /** util package (011) */
- public static final String UTIL_0001 = "ERR.015.011.0001"; //$NON-NLS-1$
-
- /** validator package (012) */
- public static final String VALIDATOR_0001 = "ERR.015.012.0001";
//$NON-NLS-1$
- public static final String VALIDATOR_0002 = "ERR.015.012.0002";
//$NON-NLS-1$
- public static final String VALIDATOR_0003 = "ERR.015.012.0003";
//$NON-NLS-1$
- public static final String VALIDATOR_0004 = "ERR.015.012.0004";
//$NON-NLS-1$
- public static final String VALIDATOR_0005 = "ERR.015.012.0005";
//$NON-NLS-1$
- public static final String VALIDATOR_0006 = "ERR.015.012.0006";
//$NON-NLS-1$
- public static final String VALIDATOR_0007 = "ERR.015.012.0007";
//$NON-NLS-1$
- public static final String VALIDATOR_0008 = "ERR.015.012.0008";
//$NON-NLS-1$
- public static final String VALIDATOR_0009 = "ERR.015.012.0009";
//$NON-NLS-1$
- public static final String VALIDATOR_0010 = "ERR.015.012.0010";
//$NON-NLS-1$
- public static final String VALIDATOR_0011 = "ERR.015.012.0011";
//$NON-NLS-1$
- public static final String VALIDATOR_0012 = "ERR.015.012.0012";
//$NON-NLS-1$
- public static final String VALIDATOR_0013 = "ERR.015.012.0013";
//$NON-NLS-1$
- public static final String VALIDATOR_0014 = "ERR.015.012.0014";
//$NON-NLS-1$
- public static final String VALIDATOR_0015 = "ERR.015.012.0015";
//$NON-NLS-1$
- public static final String VALIDATOR_0016 = "ERR.015.012.0016";
//$NON-NLS-1$
- public static final String VALIDATOR_0017 = "ERR.015.012.0017";
//$NON-NLS-1$
- public static final String VALIDATOR_0018 = "ERR.015.012.0018";
//$NON-NLS-1$
- public static final String VALIDATOR_0019 = "ERR.015.012.0019";
//$NON-NLS-1$
- public static final String VALIDATOR_0020 = "ERR.015.012.0020";
//$NON-NLS-1$
- public static final String VALIDATOR_0021 = "ERR.015.012.0021";
//$NON-NLS-1$
- public static final String VALIDATOR_0022 = "ERR.015.012.0022";
//$NON-NLS-1$
- public static final String VALIDATOR_0023 = "ERR.015.012.0023";
//$NON-NLS-1$
- public static final String VALIDATOR_0024 = "ERR.015.012.0024";
//$NON-NLS-1$
- public static final String VALIDATOR_0025 = "ERR.015.012.0025";
//$NON-NLS-1$
- public static final String VALIDATOR_0026 = "ERR.015.012.0026";
//$NON-NLS-1$
- public static final String VALIDATOR_0027 = "ERR.015.012.0027";
//$NON-NLS-1$
- public static final String VALIDATOR_0028 = "ERR.015.012.0028";
//$NON-NLS-1$
- public static final String VALIDATOR_0029 = "ERR.015.012.0029";
//$NON-NLS-1$
- public static final String VALIDATOR_0030 = "ERR.015.012.0030";
//$NON-NLS-1$
- public static final String VALIDATOR_0031 = "ERR.015.012.0031";
//$NON-NLS-1$
- public static final String VALIDATOR_0032 = "ERR.015.012.0032";
//$NON-NLS-1$
- public static final String VALIDATOR_0033 = "ERR.015.012.0033";
//$NON-NLS-1$
- public static final String VALIDATOR_0034 = "ERR.015.012.0034";
//$NON-NLS-1$
- public static final String VALIDATOR_0035 = "ERR.015.012.0035";
//$NON-NLS-1$
- public static final String VALIDATOR_0036 = "ERR.015.012.0036";
//$NON-NLS-1$
- public static final String VALIDATOR_0037 = "ERR.015.012.0037";
//$NON-NLS-1$
- public static final String VALIDATOR_0038 = "ERR.015.012.0038";
//$NON-NLS-1$
- public static final String VALIDATOR_0039 = "ERR.015.012.0039";
//$NON-NLS-1$
- public static final String VALIDATOR_0040 = "ERR.015.012.0040";
//$NON-NLS-1$
- public static final String VALIDATOR_0041 = "ERR.015.012.0041";
//$NON-NLS-1$
- public static final String VALIDATOR_0042 = "ERR.015.012.0042";
//$NON-NLS-1$
- public static final String VALIDATOR_0045 = "ERR.015.012.0045";
//$NON-NLS-1$
- public static final String VALIDATOR_0046 = "ERR.015.012.0046";
//$NON-NLS-1$
- public static final String VALIDATOR_0047 = "ERR.015.012.0047";
//$NON-NLS-1$
- public static final String VALIDATOR_0048 = "ERR.015.012.0048";
//$NON-NLS-1$
- public static final String VALIDATOR_0049 = "ERR.015.012.0049";
//$NON-NLS-1$
- public static final String VALIDATOR_0050 = "ERR.015.012.0050";
//$NON-NLS-1$
- public static final String VALIDATOR_0051 = "ERR.015.012.0051";
//$NON-NLS-1$
- public static final String VALIDATOR_0052 = "ERR.015.012.0052";
//$NON-NLS-1$
- public static final String VALIDATOR_0053 = "ERR.015.012.0053";
//$NON-NLS-1$
- public static final String VALIDATOR_0054 = "ERR.015.012.0054";
//$NON-NLS-1$
- public static final String VALIDATOR_0055 = "ERR.015.012.0055";
//$NON-NLS-1$
- public static final String VALIDATOR_0056 = "ERR.015.012.0056";
//$NON-NLS-1$
- public static final String VALIDATOR_0057 = "ERR.015.012.0057";
//$NON-NLS-1$
- public static final String VALIDATOR_0058 = "ERR.015.012.0058";
//$NON-NLS-1$
- public static final String VALIDATOR_0059 = "ERR.015.012.0059";
//$NON-NLS-1$
- public static final String VALIDATOR_0060 = "ERR.015.012.0060";
//$NON-NLS-1$
- public static final String VALIDATOR_0061 = "ERR.015.012.0061";
//$NON-NLS-1$
- public static final String VALIDATOR_0062 = "ERR.015.012.0062";
//$NON-NLS-1$
- public static final String VALIDATOR_0063 = "ERR.015.012.0063";
//$NON-NLS-1$
- public static final String VALIDATOR_0064 = "ERR.015.012.0064";
//$NON-NLS-1$
- public static final String VALIDATOR_0065 = "ERR.015.012.0065";
//$NON-NLS-1$
- public static final String VALIDATOR_0066 = "ERR.015.012.0066";
//$NON-NLS-1$
- public static final String VALIDATOR_0067 = "ERR.015.012.0067";
//$NON-NLS-1$
- public static final String VALIDATOR_0069 = "ERR.015.012.0069";
//$NON-NLS-1$
- public static final String VALIDATOR_0070 = "ERR.015.012.0070";
//$NON-NLS-1$
-}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -39,7 +39,6 @@
import org.teiid.query.sql.symbol.AggregateSymbol.Type;
import org.teiid.query.sql.visitor.AggregateSymbolCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* Validate that all ElementSymbol and ExpressionSymbols used in the HAVING
@@ -64,14 +63,14 @@
if(aggExp != null) {
Collection<AggregateSymbol> nestedAggs =
AggregateSymbolCollectorVisitor.getAggregates(aggExp, true);
if(nestedAggs.size() > 0) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0039,
nestedAggs), nestedAggs);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0039",
nestedAggs), nestedAggs); //$NON-NLS-1$
}
}
// Verify data type of aggregate expression
Type aggregateFunction = obj.getAggregateFunction();
if((aggregateFunction == Type.SUM || aggregateFunction == Type.AVG) &&
obj.getType() == null) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0041, new
Object[] {aggregateFunction, obj}), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0041", new
Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
} else if (obj.getType() != DataTypeManager.DefaultDataClasses.NULL) {
if (aggregateFunction == Type.XMLAGG && aggExp.getType() !=
DataTypeManager.DefaultDataClasses.XML) {
handleValidationError(QueryPlugin.Util.getString("AggregateValidationVisitor.non_xml",
new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
@@ -84,7 +83,7 @@
}
if(obj.isEnhancedNumeric()) {
if (!Number.class.isAssignableFrom(aggExp.getType())) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0041, new
Object[] {aggregateFunction, obj}), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0041",
new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
}
if (obj.isDistinct()) {
handleValidationError(QueryPlugin.Util.getString("AggregateValidationVisitor.invalid_distinct",
new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
@@ -121,11 +120,11 @@
if(groupExpressions == null) {
if (symbol instanceof ElementSymbol) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0037, symbol),
symbol);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0037", symbol),
symbol); //$NON-NLS-1$
}
} else if(! groupExpressions.contains(symbol)) {
if (symbol instanceof ElementSymbol) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0038, symbol),
symbol);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0038", symbol),
symbol); //$NON-NLS-1$
}
} else {
validateBelow = false;
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.symbol.*;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -80,7 +79,7 @@
* @param obj The <code>SetQuery</code> object to be visited for
validation
*/
public void visit(SetQuery obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0001));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0001"));
//$NON-NLS-1$
}
/**
@@ -89,7 +88,7 @@
* @param obj The <code>StoredProcedure</code> object to be visited for
validation
*/
public void visit(StoredProcedure obj) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0002));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0002"));
//$NON-NLS-1$
}
/**
@@ -98,7 +97,7 @@
* @param obj The <code>Insert</code> object to be visited for
validation
*/
public void visit(Insert obj) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0003));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0003"));
//$NON-NLS-1$
}
/**
@@ -107,7 +106,7 @@
* @param obj The <code>Update</code> object to be visited for
validation
*/
public void visit(Update obj) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0004));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0004"));
//$NON-NLS-1$
}
/**
@@ -116,7 +115,7 @@
* @param obj The <code>Delete</code> object to be visited for
validation
*/
public void visit(Delete obj) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0005));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0005"));
//$NON-NLS-1$
}
/**
@@ -126,7 +125,7 @@
*/
public void visit(Query obj) {
if((obj.getGroupBy() != null) || (obj.getHaving() != null)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0006));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0006"));
//$NON-NLS-1$
}
}
@@ -149,7 +148,7 @@
Expression ex = SymbolMap.getExpression(symbol);
if (!(ex instanceof ElementSymbol || ex instanceof Constant)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0007,
symbol));
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0007", symbol));
//$NON-NLS-1$
}
}
@@ -170,12 +169,12 @@
GroupSymbol group = (GroupSymbol) groupIter.next();
if(groupIter.hasNext()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0009,
obj.getGroups()));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0009",
obj.getGroups())); //$NON-NLS-1$
} else {
try {
Object groupID = group.getMetadataID();
if(groupID instanceof TempMetadataID) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0002));
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0002"));
//$NON-NLS-1$
} else {
Iterator elementsInGroupIter =
getMetadata().getElementIDsInGroupID(groupID).iterator();
// walk through all the elements in the physical group
@@ -218,7 +217,7 @@
// this method should only be executed if the element is a required element
// and none of cases above are true
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0010,
element));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0010",
element)); //$NON-NLS-1$
} catch(TeiidException e) {
handleException(e);
}
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -124,7 +124,6 @@
import org.teiid.query.sql.visitor.PredicateCollectorVisitor;
import org.teiid.query.sql.visitor.SQLStringVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.xquery.saxon.SaxonXQueryExpression;
import org.teiid.translator.SourceSystemFunctions;
@@ -238,7 +237,7 @@
if(isXMLCommand(obj)) {
//no temp table (Select Into) allowed
if(obj.getInto() != null){
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0069),obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0069"),obj);
//$NON-NLS-1$
}
this.isXML = true;
@@ -249,7 +248,7 @@
//if it is select with no from, should not have ScalarSubQuery
if(obj.getSelect() != null && obj.getFrom() == null){
if(!ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(obj.getSelect()).isEmpty()){
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0067),obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0067"),obj);
//$NON-NLS-1$
}
}
@@ -268,7 +267,7 @@
public void visit(SubquerySetCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027,
obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027",
obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
@@ -277,7 +276,7 @@
//Subcommand should have one projected symbol (query with one expression
//in SELECT or stored procedure execution that returns a single value).
if(projSymbols.size() != 1) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0011),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0011"),obj);
//$NON-NLS-1$
}
}
@@ -320,7 +319,7 @@
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.The_context_function_cannot_be_used_in_a_non-XML_command"),
obj); //$NON-NLS-1$
} else {
if (!(obj.getArg(0) instanceof ElementSymbol)){
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0036), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.004.0036"), obj);
//$NON-NLS-1$
}
for (Iterator functions =
FunctionCollectorVisitor.getFunctions(obj.getArg(1), false).iterator();
functions.hasNext();) {
@@ -370,7 +369,7 @@
String groupName = variable.getGroupSymbol().getCanonicalName();
if(groupName.equals(ProcedureReservedWords.CHANGING) ||
groupName.equals(ProcedureReservedWords.INPUTS)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0012,
ProcedureReservedWords.INPUTS, ProcedureReservedWords.CHANGING), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0012",
ProcedureReservedWords.INPUTS, ProcedureReservedWords.CHANGING), obj); //$NON-NLS-1$
}
}
@@ -382,7 +381,7 @@
//Scalar subquery should have one projected symbol (query with one expression
//in SELECT or stored procedure execution that returns a single value).
if(projSymbols.size() != 1) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0032,
obj.getCommand()), obj.getCommand());
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.008.0032",
obj.getCommand()), obj.getCommand()); //$NON-NLS-1$
}
}
@@ -412,7 +411,7 @@
// varible cannot be one of the special variables
if(elementname.equals(ProcedureReservedWords.ROWS_UPDATED)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0017, new
Object[] {ProcedureReservedWords.ROWS_UPDATED}), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0017", new
Object[] {ProcedureReservedWords.ROWS_UPDATED}), obj); //$NON-NLS-1$
}
visit((AssignmentStatement)obj);
@@ -441,12 +440,12 @@
Criteria predicateCriteria = (Criteria) criteriaIter.next();
Iterator elmntIter = ElementCollectorVisitor.getElements(predicateCriteria,
true).iterator();
if(predicateCriteria instanceof TranslateCriteria) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0019),
obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0019"), obj);
//$NON-NLS-1$
} else if(!(predicateCriteria instanceof HasCriteria)) {
while(elmntIter.hasNext()) {
ElementSymbol element = (ElementSymbol) elmntIter.next();
if(!element.isExternalReference()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0020),
obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0020"),
obj); //$NON-NLS-1$
}
}
}
@@ -468,7 +467,7 @@
ElementSymbol leftExpr = (ElementSymbol)leftElmnts.iterator().next();
if(selectElmnts != null && !selectElmnts.contains(leftExpr)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0021),
leftExpr);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0021"),
leftExpr); //$NON-NLS-1$
}
}
}
@@ -589,7 +588,7 @@
if(transleElmnts.contains(criteriaElement)) {
Expression mappedExpr = (Expression) symbolMap.get(criteriaElement);
if(mappedExpr instanceof AggregateSymbol) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0022,
criteriaElement), criteriaElement);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0022",
criteriaElement), criteriaElement); //$NON-NLS-1$
}
Iterator mapElmntIter = ElementCollectorVisitor.getElements(mappedExpr,
true).iterator();
@@ -602,7 +601,7 @@
}
}
if(!groupMatch) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0023,
criteriaElement), criteriaElement);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0023",
criteriaElement), criteriaElement); //$NON-NLS-1$
}
}
}
@@ -621,13 +620,13 @@
SupportConstants.Element.SELECT );
if(cantSelect != null) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0024,
cantSelect), cantSelect);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0024",
cantSelect), cantSelect); //$NON-NLS-1$
}
}
protected void validateHasProjectedSymbols(Command obj) {
if(obj.getProjectedSymbols().size() == 0) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0025), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0025"), obj);
//$NON-NLS-1$
}
}
@@ -646,7 +645,7 @@
private void validateSortable(SingleElementSymbol symbol) {
if (isNonComparable(symbol)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0026,
symbol), symbol);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0026",
symbol), symbol); //$NON-NLS-1$
}
}
@@ -660,7 +659,7 @@
*/
protected void validateNoXMLUpdates(Command obj) {
if(isXMLCommand(obj)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0029), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0029"), obj);
//$NON-NLS-1$
}
}
@@ -670,16 +669,16 @@
*/
protected void validateNoXMLProcedures(Command obj) {
if(isXMLCommand(obj)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0030), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0030"), obj);
//$NON-NLS-1$
}
}
private void validateXMLQuery(Query obj) {
if(obj.getGroupBy() != null) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0031), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0031"), obj);
//$NON-NLS-1$
}
if(obj.getHaving() != null) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0032), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0032"), obj);
//$NON-NLS-1$
}
if(obj.getLimit() != null) {
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.limit_not_valid_for_xml"),
obj); //$NON-NLS-1$
@@ -697,7 +696,7 @@
protected void validateGroupSupportsUpdate(GroupSymbol groupSymbol) {
try {
if(! getMetadata().groupSupports(groupSymbol.getMetadataID(),
SupportConstants.Group.UPDATE)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0033,
SQLStringVisitor.getSQLString(groupSymbol)), groupSymbol);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0033",
SQLStringVisitor.getSQLString(groupSymbol)), groupSymbol); //$NON-NLS-1$
}
} catch (TeiidComponentException e) {
handleException(e, groupSymbol);
@@ -709,7 +708,7 @@
// also check the columns of each for comparability
for (QueryCommand subQuery : query.getQueryCommands()) {
if(isXMLCommand(subQuery)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0034),
query);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0034"), query);
//$NON-NLS-1$
}
if (subQuery instanceof Query && ((Query)subQuery).getInto() != null)
{
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.union_insert"),
query); //$NON-NLS-1$
@@ -774,7 +773,7 @@
while(elementIter.hasNext()) {
ElementSymbol insertElem = (ElementSymbol) elementIter.next();
if(! getMetadata().elementSupports(insertElem.getMetadataID(),
SupportConstants.Element.UPDATE)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0052,
insertElem), insertElem);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0052",
insertElem), insertElem); //$NON-NLS-1$
}
}
@@ -790,7 +789,7 @@
if(!getMetadata().elementSupports(nextElmnt.getMetadataID(),
SupportConstants.Element.DEFAULT_VALUE) &&
!getMetadata().elementSupports(nextElmnt.getMetadataID(),
SupportConstants.Element.NULL) &&
!getMetadata().elementSupports(nextElmnt.getMetadataID(),
SupportConstants.Element.AUTO_INCREMENT)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0053, new
Object[] {insertGroup, nextElmnt}), nextElmnt);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0053", new
Object[] {insertGroup, nextElmnt}), nextElmnt); //$NON-NLS-1$
}
}
@@ -805,7 +804,7 @@
// If nextValue is an expression, evaluate it before checking for
null
Object evaluatedValue = Evaluator.evaluate(nextValue);
if(evaluatedValue == null && !
getMetadata().elementSupports(nextVar.getMetadataID(), SupportConstants.Element.NULL)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0055,
SQLStringVisitor.getSQLString(nextVar)), nextVar);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055",
SQLStringVisitor.getSQLString(nextVar)), nextVar); //$NON-NLS-1$
}
} catch(ExpressionEvaluationException e) {
//ignore for now, we don't have the context which could be
the problem
@@ -827,7 +826,7 @@
}
}
if(!dups.isEmpty()) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0062, dups),
dups);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0062", dups),
dups); //$NON-NLS-1$
}
}
@@ -837,12 +836,12 @@
for (SetClause entry : update.getChangeList().getClauses()) {
ElementSymbol elementID = entry.getSymbol();
if(elementID.isExternalReference()) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0058,
SQLStringVisitor.getSQLString(elementID)), elementID);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0058",
SQLStringVisitor.getSQLString(elementID)), elementID); //$NON-NLS-1$
}
// Check that left side element is updatable
if(! getMetadata().elementSupports(elementID.getMetadataID(),
SupportConstants.Element.UPDATE)) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0059,
elementID), elementID);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0059", elementID),
elementID); //$NON-NLS-1$
}
// Check that right expression is a constant and is non-null
@@ -858,7 +857,7 @@
if(value instanceof Constant) {
// If value is null, check that element supports this as a nullable column
if(((Constant)value).isNull() && !
getMetadata().elementSupports(elementID.getMetadataID(), SupportConstants.Element.NULL))
{
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0060,
SQLStringVisitor.getSQLString(elementID)), elementID);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0060",
SQLStringVisitor.getSQLString(elementID)), elementID); //$NON-NLS-1$
}// end of if
} else if (!EvaluatableVisitor.willBecomeConstant(value)) {
// If this is an update on a virtual group, verify that no elements
are in the right side
@@ -870,7 +869,7 @@
while(iter.hasNext()) {
ElementSymbol element = (ElementSymbol) iter.next();
if(! element.isExternalReference()) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0061,
SQLStringVisitor.getSQLString(value)), value);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0061",
SQLStringVisitor.getSQLString(value)), value); //$NON-NLS-1$
}
}
}
@@ -955,7 +954,7 @@
}
}
if(!foundVar) {
-
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0016,
ProcedureReservedWords.ROWS_UPDATED), obj);
+
handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0016",
ProcedureReservedWords.ROWS_UPDATED), obj); //$NON-NLS-1$
}
}
@@ -977,7 +976,7 @@
*/
public void visit(BetweenCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027,
obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027",
obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1012,7 +1011,7 @@
*/
public void visit(SetCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027,
obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027",
obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1023,7 +1022,7 @@
*/
public void visit(SubqueryCompareCriteria obj) {
if (isNonComparable(obj.getLeftExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027,
obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027",
obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1079,7 +1078,7 @@
@Override
public void visit(CompareCriteria obj) {
if (isNonComparable(obj.getLeftExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027,
obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027",
obj),obj); //$NON-NLS-1$
}
// Validate use of 'rowlimit' and 'rowlimitexception'
pseudo-functions - they cannot be nested within another
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
===================================================================
---
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -27,7 +27,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
public class ValidatorReport extends ActivityReport {
@@ -51,12 +50,12 @@
public String getFailureMessage() {
Collection failures = getItemsByType(ValidatorFailure.VALIDATOR_FAILURE);
if(failures.size() == 0) {
- return QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0064);
+ return QueryPlugin.Util.getString("ERR.015.012.0064");
//$NON-NLS-1$
} else if(failures.size() == 1) {
return failures.iterator().next().toString();
} else {
StringBuffer err = new StringBuffer();
- err.append(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0063));
+ err.append(QueryPlugin.Util.getString("ERR.015.012.0063"));
//$NON-NLS-1$
Iterator iter = failures.iterator();
ValidatorFailure failure = (ValidatorFailure) iter.next();
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
---
branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-09-08
16:07:43 UTC (rev 2545)
+++
branches/7.1.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-09-08
17:16:13 UTC (rev 2546)
@@ -98,7 +98,6 @@
import org.teiid.query.unittest.FakeMetadataStore;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.unittest.TimestampUtil;
-import org.teiid.query.util.ErrorMessageKeys;
@SuppressWarnings("nls")
public class TestResolver {
@@ -2900,7 +2899,7 @@
fail("expected exception");
} catch (RuntimeException e) {
QueryResolverException qre = (QueryResolverException)e.getCause();
- assertEquals(ErrorMessageKeys.RESOLVER_0040, qre.getCode());
+ assertEquals("ERR.015.008.0040", qre.getCode());
}
}