Author: shawkins
Date: 2010-09-27 11:41:57 -0400 (Mon, 27 Sep 2010)
New Revision: 2612
Modified:
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
Log:
TEIID-1156 changing the validation lengths
Modified:
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-24
21:00:16 UTC (rev 2611)
+++
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-27
15:41:57 UTC (rev 2612)
@@ -42,7 +42,7 @@
/**
* Maximum length for function names, parameter names, categories, and descriptions.
*/
- public static final int MAX_LENGTH = 128;
+ public static final int MAX_LENGTH = 255;
// Can't construct
private FunctionMetadataValidator() {
@@ -139,7 +139,7 @@
* Determine whether a function or parameter name is valid. The following items are
validated:
* <UL>
* <LI>Validate that name is not null</LI>
- * <LI>Validate that name has length <= 128</LI>
+ * <LI>Validate that name has length <= MAX_LENGTH</LI>
* <LI>Validate that name starts with alphabetic character</LI>
* <LI>Validate that name contains only valid characters: letters, numbers, and
_</LI>
* </UL>
@@ -172,14 +172,14 @@
/**
* Determine whether a description is valid. The following items are validated:
* <UL>
- * <LI>Validate that description (if not null) has length <= 128</LI>
+ * <LI>Validate that description (if not null) has length <=
4000</LI>
* </UL>
* @param description Description to validate
* @throws FunctionMetadataException Thrown if description is not valid in some way
*/
public static final void validateDescription(String description) throws
FunctionMetadataException {
if(description != null) {
- validateLength(description, MAX_LENGTH, "Description"); //$NON-NLS-1$
+ validateLength(description, DataTypeManager.MAX_STRING_LENGTH,
"Description"); //$NON-NLS-1$
}
}
@@ -187,7 +187,7 @@
* Determine whether a category is valid. The following items are validated:
* <UL>
* <LI>Validate that category is not null</LI>
- * <LI>Validate that category has length <= 128</LI>
+ * <LI>Validate that category has length <= MAX_LENGTH</LI>
* </UL>
* @param category Category to validate
* @throws FunctionMetadataException Thrown if category is not valid in some way