### Eclipse Workspace Patch 1.0
#P org.teiid.designer.ui
Index: src/com/metamatrix/modeler/internal/ui/viewsupport/RelationalObjectBuilder.java
===================================================================
--- src/com/metamatrix/modeler/internal/ui/viewsupport/RelationalObjectBuilder.java	(revision 1029)
+++ src/com/metamatrix/modeler/internal/ui/viewsupport/RelationalObjectBuilder.java	(working copy)
@@ -338,8 +338,6 @@
         private static final String VARCHAR2_TYPE_NAME = "VARCHAR2"; //$NON-NLS-1$
         private static final String NVARCHAR2_TYPE_NAME = "NVARCHAR2"; //$NON-NLS-1$
         private static final String TIMESTAMP_TYPE_NAME = "TIMESTAMP("; //$NON-NLS-1$
-        private static final String NUMBER_TYPE_NAME = "NUMBER"; //$NON-NLS-1$
-        private static final String REF_CURSOR = "REF CURSOR"; //$NON-NLS-1$
 
         /**
          * Construct an instance of OracleModelProcessor.
@@ -386,16 +384,6 @@
                                     final List problems ) {
 
             EObject result = null;
-            // If the type is NUMERIC and precision is non-zero, then look at the length of the column ...
-            // (assume zero length means the length isn't known)
-            if (precision != 0) {
-                if (NUMBER_TYPE_NAME.equalsIgnoreCase(typeName) || REF_CURSOR.equalsIgnoreCase(typeName)) {
-                    result = findType(precision, scale, problems);
-                }
-            }
-            if (result != null) {
-                return result;
-            }
 
             // Oracle 9i introduced the "timestamp" type name (with type=1111, or OTHER)
             if (typeName.startsWith(TIMESTAMP_TYPE_NAME)) {
#P org.teiid.designer.metamodels.relational
Index: src/com/metamatrix/metamodels/relational/util/RelationalTypeMappingImpl.java
===================================================================
--- src/com/metamatrix/metamodels/relational/util/RelationalTypeMappingImpl.java	(revision 1029)
+++ src/com/metamatrix/metamodels/relational/util/RelationalTypeMappingImpl.java	(working copy)
@@ -29,7 +29,7 @@
 public class RelationalTypeMappingImpl implements RelationalTypeMapping {
 
     private static RelationalTypeMapping instance;
-    
+
     public static RelationalTypeMapping getInstance() {
         if (RelationalTypeMappingImpl.instance == null) {
             RelationalTypeMappingImpl.instance = new RelationalTypeMappingImpl();
@@ -46,27 +46,26 @@
         return null;
     }
 
-
-//    /**
-//     * Method used to instantiate the {@link RelationalTypeMapping#INSTANCE}
-//     * @return an instance of this type mapping
-//     */
-//    public static RelationalTypeMapping init() {
-//        return new RelationalTypeMappingImpl();    
-//    }
-//
+    // /**
+    // * Method used to instantiate the {@link RelationalTypeMapping#INSTANCE}
+    // * @return an instance of this type mapping
+    // */
+    // public static RelationalTypeMapping init() {
+    // return new RelationalTypeMappingImpl();
+    // }
+    //
     /** Map from JDBC type name to built-in type name */
     private final Map jdbcToBuiltInType;
     /** Map from built-in type name to JDBC type name */
     private final Map builtInTypeToJdbc;
-    /** Map from JDBC type integer to JDBC type name  */
+    /** Map from JDBC type integer to JDBC type name */
     private final Map jdbcIntToJdbcName;
-    
-    /** Map from Datatype to JDBC type name  */
+
+    /** Map from Datatype to JDBC type name */
     private final Map datatypeToJdbcName;
-    
+
     private final DatatypeManager datatypeManager;
-    
+
     private boolean initialized;
 
     /**
@@ -75,7 +74,7 @@
     public RelationalTypeMappingImpl() {
         this(RelationalTypeMappingImpl.getStandardDatatypeManager());
     }
-    
+
     /**
      * Construct an instance of RelationalTypeMapping.
      */
@@ -86,59 +85,63 @@
         this.jdbcIntToJdbcName = new HashMap();
         this.datatypeToJdbcName = new HashMap();
         this.datatypeManager = datatypeManager;
-        if ( this.datatypeManager == null ) {
+        if (this.datatypeManager == null) {
             final String msg = RelationalPlugin.Util.getString("RelationalTypeMapping.No_DatatypeManager"); //$NON-NLS-1$
-            RelationalPlugin.Util.log(IStatus.ERROR,msg);
+            RelationalPlugin.Util.log(IStatus.ERROR, msg);
         }
     }
-    
+
     protected void initialize() {
-        if ( this.initialized ) {
+        if (this.initialized) {
             return;
         }
         // Set the initialized state right away, in case there are any exceptions later on
         // (we don't want to keep initializing over and over if there are problems).
         // Plus, the 'register' call also calls initialize, so we don't want it to be an infinite loop
         this.initialized = true;
-        
-        if ( this.datatypeManager == null ) {
+
+        if (this.datatypeManager == null) {
             return;
         }
 
-        //register(Types.ARRAY,         SQL_TYPE_NAMES.ARRAY,        internalFindDatatype(DatatypeConstants.BuiltInNames.) );
-        register(Types.BIGINT,        SQL_TYPE_NAMES.BIGINT,       internalFindDatatype(DatatypeConstants.BuiltInNames.BIG_INTEGER) );
-        register(Types.BINARY,        SQL_TYPE_NAMES.BINARY,       internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.BIT,           SQL_TYPE_NAMES.BIT,          internalFindDatatype(DatatypeConstants.BuiltInNames.SHORT) );
-        register(Types.BLOB,          SQL_TYPE_NAMES.BLOB,         internalFindDatatype(DatatypeConstants.BuiltInNames.BLOB) );
-        register(Types.CHAR,          SQL_TYPE_NAMES.CHAR,         internalFindDatatype(DatatypeConstants.BuiltInNames.CHAR) );
-        register(Types.CLOB,          SQL_TYPE_NAMES.CLOB,         internalFindDatatype(DatatypeConstants.BuiltInNames.CLOB) );
-        register(Types.DATE,          SQL_TYPE_NAMES.DATE,         internalFindDatatype(DatatypeConstants.BuiltInNames.DATE) );
-        register(Types.DECIMAL,       SQL_TYPE_NAMES.DECIMAL,      internalFindDatatype(DatatypeConstants.BuiltInNames.DOUBLE) );
-        //register(Types.DISTINCT,      SQL_TYPE_NAMES.DISTINCT,     internalFindDatatype(DatatypeConstants.BuiltInNames.) );
-        register(Types.DOUBLE,        SQL_TYPE_NAMES.DOUBLE,       internalFindDatatype(DatatypeConstants.BuiltInNames.DOUBLE) );
-        register(Types.NUMERIC,       SQL_TYPE_NAMES.NUMERIC,      internalFindDatatype(DatatypeConstants.BuiltInNames.INTEGER) );
-        register(Types.INTEGER,       SQL_TYPE_NAMES.INTEGER,      internalFindDatatype(DatatypeConstants.BuiltInNames.INT) );
-        register(Types.FLOAT,         SQL_TYPE_NAMES.FLOAT,        internalFindDatatype(DatatypeConstants.BuiltInNames.FLOAT) );
-        register(Types.LONGVARBINARY, SQL_TYPE_NAMES.LONGVARBINARY,internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.LONGVARCHAR,   SQL_TYPE_NAMES.LONGVARCHAR,  internalFindDatatype(DatatypeConstants.BuiltInNames.STRING) );
-        register(Types.NCHAR,         SQL_TYPE_NAMES.NCHAR,        internalFindDatatype(DatatypeConstants.BuiltInNames.STRING) );
-        register(Types.NVARCHAR,      SQL_TYPE_NAMES.NVARCHAR,     internalFindDatatype(DatatypeConstants.BuiltInNames.STRING) );
-        register(NO_INT_TYPE,         SQL_TYPE_NAMES.NTEXT,        internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        //register(Types.NULL,          SQL_TYPE_NAMES.NULL,         internalFindDatatype(DatatypeConstants.BuiltInNames.) );
-        register(Types.NUMERIC,       SQL_TYPE_NAMES.NUMERIC,      internalFindDatatype(DatatypeConstants.BuiltInNames.LONG) );
-        register(Types.NUMERIC,       SQL_TYPE_NAMES.NUMERIC,      internalFindDatatype(DatatypeConstants.BuiltInNames.BIG_DECIMAL) );
-        register(Types.OTHER,         SQL_TYPE_NAMES.OTHER,        internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.REAL,          SQL_TYPE_NAMES.REAL,         internalFindDatatype(DatatypeConstants.BuiltInNames.DOUBLE) );
-        register(Types.REF,           SQL_TYPE_NAMES.REF,          internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.SMALLINT,      SQL_TYPE_NAMES.SMALLINT,     internalFindDatatype(DatatypeConstants.BuiltInNames.SHORT) );
-        register(Types.STRUCT,        SQL_TYPE_NAMES.STRUCT,       internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.TIME,          SQL_TYPE_NAMES.TIME,         internalFindDatatype(DatatypeConstants.BuiltInNames.TIME) );
-        register(Types.TIMESTAMP,     SQL_TYPE_NAMES.TIMESTAMP,    internalFindDatatype(DatatypeConstants.BuiltInNames.TIMESTAMP) );
-        register(Types.TINYINT,       SQL_TYPE_NAMES.TINYINT,      internalFindDatatype(DatatypeConstants.BuiltInNames.SHORT) );
-        register(Types.VARBINARY,     SQL_TYPE_NAMES.VARBINARY,    internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT) );
-        register(Types.VARCHAR,       SQL_TYPE_NAMES.VARCHAR,      internalFindDatatype(DatatypeConstants.BuiltInNames.STRING) );
+        // Teiid degenerate/aliased types
+        register(Types.CHAR, SQL_TYPE_NAMES.CHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.CHAR));
+        register(Types.NUMERIC, SQL_TYPE_NAMES.NUMERIC, internalFindDatatype(DatatypeConstants.BuiltInNames.BIG_INTEGER));
+        register(Types.INTEGER, SQL_TYPE_NAMES.INTEGER, internalFindDatatype(DatatypeConstants.BuiltInNames.INT));
+
+        // register(Types.ARRAY, SQL_TYPE_NAMES.ARRAY, internalFindDatatype(DatatypeConstants.BuiltInNames.) );
+        register(Types.BIGINT, SQL_TYPE_NAMES.BIGINT, internalFindDatatype(DatatypeConstants.BuiltInNames.LONG));
+        register(Types.BINARY, SQL_TYPE_NAMES.BINARY, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.BIT, SQL_TYPE_NAMES.BIT, internalFindDatatype(DatatypeConstants.BuiltInNames.BOOLEAN));
+        register(Types.BLOB, SQL_TYPE_NAMES.BLOB, internalFindDatatype(DatatypeConstants.BuiltInNames.BLOB));
+        register(Types.CHAR, SQL_TYPE_NAMES.CHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.STRING));
+        register(Types.CLOB, SQL_TYPE_NAMES.CLOB, internalFindDatatype(DatatypeConstants.BuiltInNames.CLOB));
+        register(Types.DATE, SQL_TYPE_NAMES.DATE, internalFindDatatype(DatatypeConstants.BuiltInNames.DATE));
+        register(Types.DECIMAL, SQL_TYPE_NAMES.DECIMAL, internalFindDatatype(DatatypeConstants.BuiltInNames.BIG_DECIMAL));
+        // register(Types.DISTINCT, SQL_TYPE_NAMES.DISTINCT, internalFindDatatype(DatatypeConstants.BuiltInNames.) );
+        register(Types.DOUBLE, SQL_TYPE_NAMES.DOUBLE, internalFindDatatype(DatatypeConstants.BuiltInNames.DOUBLE));
+        register(Types.INTEGER, SQL_TYPE_NAMES.INTEGER, internalFindDatatype(DatatypeConstants.BuiltInNames.INTEGER));
+        register(Types.FLOAT, SQL_TYPE_NAMES.FLOAT, internalFindDatatype(DatatypeConstants.BuiltInNames.FLOAT));
+        register(Types.LONGVARBINARY, SQL_TYPE_NAMES.LONGVARBINARY, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.LONGVARCHAR, SQL_TYPE_NAMES.LONGVARCHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.STRING));
+        register(Types.NCHAR, SQL_TYPE_NAMES.NCHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.STRING));
+        register(Types.NUMERIC, SQL_TYPE_NAMES.NUMERIC, internalFindDatatype(DatatypeConstants.BuiltInNames.BIG_DECIMAL));
+        register(Types.NVARCHAR, SQL_TYPE_NAMES.NVARCHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.STRING));
+        register(NO_INT_TYPE, SQL_TYPE_NAMES.NTEXT, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        // register(Types.NULL, SQL_TYPE_NAMES.NULL, internalFindDatatype(DatatypeConstants.BuiltInNames.) );
+        register(Types.OTHER, SQL_TYPE_NAMES.OTHER, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.REAL, SQL_TYPE_NAMES.REAL, internalFindDatatype(DatatypeConstants.BuiltInNames.FLOAT));
+        register(Types.REF, SQL_TYPE_NAMES.REF, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.SMALLINT, SQL_TYPE_NAMES.SMALLINT, internalFindDatatype(DatatypeConstants.BuiltInNames.SHORT));
+        register(Types.SQLXML, SQL_TYPE_NAMES.SQLXML, internalFindDatatype(DatatypeConstants.BuiltInNames.XML_LITERAL));
+        register(Types.STRUCT, SQL_TYPE_NAMES.STRUCT, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.TIME, SQL_TYPE_NAMES.TIME, internalFindDatatype(DatatypeConstants.BuiltInNames.TIME));
+        register(Types.TIMESTAMP, SQL_TYPE_NAMES.TIMESTAMP, internalFindDatatype(DatatypeConstants.BuiltInNames.TIMESTAMP));
+        register(Types.TINYINT, SQL_TYPE_NAMES.TINYINT, internalFindDatatype(DatatypeConstants.BuiltInNames.BYTE));
+        register(Types.VARBINARY, SQL_TYPE_NAMES.VARBINARY, internalFindDatatype(DatatypeConstants.BuiltInNames.OBJECT));
+        register(Types.VARCHAR, SQL_TYPE_NAMES.VARCHAR, internalFindDatatype(DatatypeConstants.BuiltInNames.STRING));
     }
-    
+
     protected EObject internalFindDatatype( final String identifier ) {
         try {
             return this.datatypeManager.getBuiltInDatatype(identifier);
@@ -147,72 +150,78 @@
         }
         return null;
     }
-    
+
     protected EObject findDatatype( final String identifier ) throws ModelerCoreException {
         EObject result = this.datatypeManager.getBuiltInDatatype(identifier);
-        if ( result == null ) {
+        if (result == null) {
             result = this.datatypeManager.findDatatype(identifier);
         }
         return result;
     }
-    
+
     /**
-     * Register the JDBC type name and datatype pair.  This method obtains the 
-     * {@link SqlDatatypeAspect} for the supplied datatype, gets from it the 
-     * {@link SqlDatatypeAspect#getDatatypeID(EObject) datatype ID}, and then
-     * calls {@link #register(String, String) register(jdbcTypeName,datatype ID)}.
-     * @param jdbcTypeInt the JDBC type constant (see {@link Types}),
-     * or {@link #NO_INT_TYPE} if the type shouldn't be registered with an integer type
+     * Register the JDBC type name and datatype pair. This method obtains the {@link SqlDatatypeAspect} for the supplied datatype,
+     * gets from it the {@link SqlDatatypeAspect#getDatatypeID(EObject) datatype ID}, and then calls
+     * {@link #register(String, String) register(jdbcTypeName,datatype ID)}.
+     * 
+     * @param jdbcTypeInt the JDBC type constant (see {@link Types}), or {@link #NO_INT_TYPE} if the type shouldn't be registered
+     *        with an integer type
      * @param jdbcTypeName the name of the JDBC type; may not be null
      * @param datatype the {@link Datatype}; may not be null
      */
-    public void register( final int jdbcTypeInt, final String jdbcTypeName, final EObject datatype ) {
+    public void register( final int jdbcTypeInt,
+                          final String jdbcTypeName,
+                          final EObject datatype ) {
         initialize();
         CoreArgCheck.isNotNull(jdbcTypeName);
         CoreArgCheck.isNotNull(datatype);
         final String identifier = getIdentifier(datatype);
-        register(jdbcTypeInt,jdbcTypeName,identifier);
+        register(jdbcTypeInt, jdbcTypeName, identifier);
     }
-    
+
     /**
      * Register the JDBC type name and datatype pair.
-     * @param jdbcTypeInt the JDBC type constant (see {@link Types}),
-     * or {@link #NO_INT_TYPE} if the type shouldn't be registered with an integer type
+     * 
+     * @param jdbcTypeInt the JDBC type constant (see {@link Types}), or {@link #NO_INT_TYPE} if the type shouldn't be registered
+     *        with an integer type
      * @param jdbcTypeName the name of the JDBC type; may not be null
      * @param datatypeUri the unique identifier for the {@link Datatype}; may not be null
      */
-    public void register( final int jdbcTypeInt, final String jdbcTypeName, final String datatypeUri ) {
+    public void register( final int jdbcTypeInt,
+                          final String jdbcTypeName,
+                          final String datatypeUri ) {
         initialize();
         CoreArgCheck.isNotNull(jdbcTypeName);
         CoreArgCheck.isNotNull(datatypeUri);
         final String jdbcUpperTypeName = jdbcTypeName.toUpperCase();
-        this.jdbcToBuiltInType.put(jdbcUpperTypeName,datatypeUri);
-        this.builtInTypeToJdbc.put(datatypeUri,jdbcUpperTypeName);
-        if ( jdbcTypeInt != NO_INT_TYPE ) {
-            this.jdbcIntToJdbcName.put(new Integer(jdbcTypeInt),jdbcUpperTypeName);
+        this.jdbcToBuiltInType.put(jdbcUpperTypeName, datatypeUri);
+        this.builtInTypeToJdbc.put(datatypeUri, jdbcUpperTypeName);
+        if (jdbcTypeInt != NO_INT_TYPE) {
+            this.jdbcIntToJdbcName.put(new Integer(jdbcTypeInt), jdbcUpperTypeName);
         }
     }
-    
+
     protected String getIdentifier( final EObject datatype ) {
         CoreArgCheck.isNotNull(datatype);
-        final SqlAspect sqlAspect = (SqlAspect)ModelerCore.getMetamodelRegistry().getMetamodelAspect(datatype,SqlAspect.class);
-        if ( sqlAspect == null ) {
+        final SqlAspect sqlAspect = (SqlAspect)ModelerCore.getMetamodelRegistry().getMetamodelAspect(datatype, SqlAspect.class);
+        if (sqlAspect == null) {
             return this.datatypeManager.getName(datatype);
         }
-        if ( sqlAspect instanceof SqlDatatypeAspect ) {
+        if (sqlAspect instanceof SqlDatatypeAspect) {
             final SqlDatatypeAspect datatypeAspect = (SqlDatatypeAspect)sqlAspect;
             final String id = datatypeAspect.getDatatypeID(datatype);
             return id;
         }
         final Object id = sqlAspect.getObjectID(datatype);
-        if ( id != null ) {
+        if (id != null) {
             return id.toString();
         }
         return null;
     }
-    
+
     /**
      * Find the {@link Datatype} that corresponds to the supplied type name from a JDBC data source.
+     * 
      * @param jdbcTypeName the name of the JDBC type
      * @return the Datatype that best corresponds to the JDBC type name
      * @throws ModelerCoreException if there is a problem with the datatype manager
@@ -220,39 +229,41 @@
     public EObject getDatatype( final String jdbcTypeName ) throws ModelerCoreException {
         initialize();
         EObject result = null;
-        if ( jdbcTypeName != null ) {
+        if (jdbcTypeName != null) {
             final String identifier = (String)this.jdbcToBuiltInType.get(jdbcTypeName.toUpperCase());
-            if ( identifier != null ) {
+            if (identifier != null) {
                 result = findDatatype(identifier);
             }
         }
-        if ( result == null ) {
+        if (result == null) {
             result = findDatatype(DatatypeConstants.BuiltInNames.OBJECT);
         }
         return result;
     }
-    
+
     /**
      * Find the {@link Datatype} that corresponds to the supplied {@link java.sql.Types JDBC type}.
+     * 
      * @param jdbcType the {@link Type JDBC type}
-     * @return the Datatype that best corresponds to the JDBC type, or null if no 
-     * Datatype could be found or if the type is ambiguous (such as {@link Types#OTHER}).
+     * @return the Datatype that best corresponds to the JDBC type, or null if no Datatype could be found or if the type is
+     *         ambiguous (such as {@link Types#OTHER}).
      * @throws ModelerCoreException if there is a problem with the datatype manager
      */
     public EObject getDatatype( final int jdbcType ) throws ModelerCoreException {
         initialize();
         final String jdbcTypeName = (String)this.jdbcIntToJdbcName.get(new Integer(jdbcType));
         EObject result = null;
-        if ( jdbcTypeName != null ) {
+        if (jdbcTypeName != null) {
             result = getDatatype(jdbcTypeName);
         }
         return result;
     }
-    
+
     /**
-     * Find the name of the JDBC type that corresponds to the supplied datatype.  If there is not
-     * corresponding JDBC type, this method obtains the base type for the supplied type and looks
-     * for its corresponding JDBC type.  This process continues until either the 
+     * Find the name of the JDBC type that corresponds to the supplied datatype. If there is not corresponding JDBC type, this
+     * method obtains the base type for the supplied type and looks for its corresponding JDBC type. This process continues until
+     * either the
+     * 
      * @param type the datatype for which the corresponding JDBC type is to be found
      * @return the name of the JDBC type that best corresponds to the supplied type; never null
      * @throws ModelerCoreException if there is a problem with the datatype manager
@@ -261,60 +272,63 @@
         CoreArgCheck.isNotNull(type);
         initialize();
         String name = (String)datatypeToJdbcName.get(type);
-        if ( name == null ) {
+        if (name == null) {
             EObject theType = type;
             // Go up the hiearchy until we get to a built-in ...
-            while ( name == null && theType != null ) {
+            while (name == null && theType != null) {
                 final String id = getIdentifier(theType);
-                name = (String) this.builtInTypeToJdbc.get(id);
-                if ( name == null && this.datatypeManager != null ) {
+                name = (String)this.builtInTypeToJdbc.get(id);
+                if (name == null && this.datatypeManager != null) {
                     theType = this.datatypeManager.getBaseType(theType);
-                    if ( theType == null ) {
+                    if (theType == null) {
                         break;
                     }
                 }
             }
-            if ( name == null ) {
+            if (name == null) {
                 final EObject objType = findDatatype(DatatypeConstants.BuiltInNames.OBJECT);
                 CoreArgCheck.isNotNull(objType);
                 final String id = getIdentifier(objType);
                 CoreArgCheck.isNotNull(id);
-                name = (String) this.builtInTypeToJdbc.get(id);
+                name = (String)this.builtInTypeToJdbc.get(id);
             }
             CoreArgCheck.isNotNull(name);
 
-            this.datatypeToJdbcName.put(type,name);
+            this.datatypeToJdbcName.put(type, name);
         }
         return name;
     }
-    
+
     public SearchabilityType getSearchabilityType( final EObject datatype ) {
-        if ( datatype == null ) {
+        if (datatype == null) {
             return SearchabilityType.UNSEARCHABLE_LITERAL;
         }
         initialize();
         EObject dt = datatype;
-        while ( dt != null && !this.datatypeManager.isBuiltInDatatype(dt) ) {
+        while (dt != null && !this.datatypeManager.isBuiltInDatatype(dt)) {
             final EObject baseType = this.datatypeManager.getBaseType(dt);
             dt = this.datatypeManager.isSimpleDatatype(baseType) ? baseType : null;
         }
-        
+
         final String typeName = this.datatypeManager.getName(dt);
         // These are SEARCHABLE
-        if ( DatatypeConstants.BuiltInNames.STRING.equals(typeName) ) {
+        if (DatatypeConstants.BuiltInNames.STRING.equals(typeName)) {
             return SearchabilityType.SEARCHABLE_LITERAL;
         }
-        if ( DatatypeConstants.BuiltInNames.CHAR.equals(typeName) ) {
+        if (DatatypeConstants.BuiltInNames.CHAR.equals(typeName)) {
             return SearchabilityType.SEARCHABLE_LITERAL;
         }
-        if ( DatatypeConstants.BuiltInNames.CLOB.equals(typeName) ) {
-            return SearchabilityType.LIKE_ONLY_LITERAL;     // per defect 10501
+        if (DatatypeConstants.BuiltInNames.CLOB.equals(typeName)) {
+            return SearchabilityType.LIKE_ONLY_LITERAL; // per defect 10501
         }
         // These are UNSEARCHABLE ...
-        if ( DatatypeConstants.BuiltInNames.BLOB.equals(typeName) ) {
+        if (DatatypeConstants.BuiltInNames.BLOB.equals(typeName)) {
             return SearchabilityType.UNSEARCHABLE_LITERAL;
         }
-        if ( DatatypeConstants.BuiltInNames.OBJECT.equals(typeName) ) {
+        if (DatatypeConstants.BuiltInNames.XML_LITERAL.equals(typeName)) {
+            return SearchabilityType.UNSEARCHABLE_LITERAL;
+        }
+        if (DatatypeConstants.BuiltInNames.OBJECT.equals(typeName)) {
             return SearchabilityType.UNSEARCHABLE_LITERAL;
         }
         // The rest are numbers or dates ...
Index: src/com/metamatrix/metamodels/relational/util/RelationalTypeMapping.java
===================================================================
--- src/com/metamatrix/metamodels/relational/util/RelationalTypeMapping.java	(revision 1029)
+++ src/com/metamatrix/metamodels/relational/util/RelationalTypeMapping.java	(working copy)
@@ -45,6 +45,7 @@
         public static final String REAL = "REAL"; //$NON-NLS-1$
         public static final String REF = "REF"; //$NON-NLS-1$
         public static final String SMALLINT = "SMALLINT"; //$NON-NLS-1$
+        public static final String SQLXML = "SQLXML"; //$NON-NLS-1$
         public static final String STRUCT = "STRUCT"; //$NON-NLS-1$
         public static final String TIME = "TIME"; //$NON-NLS-1$
         public static final String TIMESTAMP = "TIMESTAMP"; //$NON-NLS-1$
#P org.teiid.designer.relational.ui
Index: src/com/metamatrix/modeler/internal/relational/ui/textimport/AllRelationalModelProcessor.java
===================================================================
--- src/com/metamatrix/modeler/internal/relational/ui/textimport/AllRelationalModelProcessor.java	(revision 1029)
+++ src/com/metamatrix/modeler/internal/relational/ui/textimport/AllRelationalModelProcessor.java	(working copy)
@@ -15,88 +15,77 @@
 import com.metamatrix.modeler.core.types.DatatypeConstants;
 import com.metamatrix.modeler.jdbc.relational.impl.RelationalModelProcessorImpl;
 
-
-/** 
+/**
  * @since 4.2
  */
 public class AllRelationalModelProcessor extends RelationalModelProcessorImpl {
     private static final String VARCHAR2_TYPE_NAME = "VARCHAR2"; //$NON-NLS-1$
     private static final String NVARCHAR2_TYPE_NAME = "NVARCHAR2"; //$NON-NLS-1$
     private static final String TIMESTAMP_TYPE_NAME = "TIMESTAMP("; //$NON-NLS-1$
-    private static final String NUMBER_TYPE_NAME = "NUMBER"; //$NON-NLS-1$
-    private static final String REF_CURSOR = "REF CURSOR"; //$NON-NLS-1$
-    
+
     /**
      * Construct an instance of OracleModelProcessor.
+     * 
      * @param factory
      */
-    public AllRelationalModelProcessor(final RelationalFactory factory, final RelationalTypeMapping mapping) {
-        super(factory,mapping);
+    public AllRelationalModelProcessor( final RelationalFactory factory,
+                                        final RelationalTypeMapping mapping ) {
+        super(factory, mapping);
         setDatatypeManager(ModelerCore.getWorkspaceDatatypeManager());
     }
-    
+
     /**
-     * Find the type given the supplied information.  This method is called by the
-     * various <code>create*</code> methods, and is currently implemented to use
-     * {@link #findType(int, int, List)} when a numeric type and {@link #findType(String, List)}
-     * (by name) for other types.
+     * Find the type given the supplied information. This method is called by the various <code>create*</code> methods, and is
+     * currently implemented to use {@link #findType(int, int, List)} when a numeric type and {@link #findType(String, List)} (by
+     * name) for other types.
+     * 
      * @param type
      * @param typeName
      * @return
      */
     @Override
-    protected EObject findType(final int jdbcType, final String typeName, 
-                                final int length, final int precision, final int scale,
+    protected EObject findType( final int jdbcType,
+                                final String typeName,
+                                final int length,
+                                final int precision,
+                                final int scale,
                                 final List problems ) {
-                                    
+
         EObject result = null;
-        // If the type is NUMERIC and precision is non-zero, then look at the length of the column ...
-        // (assume zero length means the length isn't known)
-        if ( precision != 0 ) {
-            if ( NUMBER_TYPE_NAME.equalsIgnoreCase(typeName) || 
-                 REF_CURSOR.equalsIgnoreCase(typeName) ) {
-                result = findType(precision,scale,problems);
-            }
-        }
-        if ( result != null ) {
-            return result;
-        }
-        
+
         // Oracle 9i introduced the "timestamp" type name (with type=1111, or OTHER)
-        if ( typeName.startsWith(TIMESTAMP_TYPE_NAME) ) {
-            result = findBuiltinType(DatatypeConstants.BuiltInNames.TIMESTAMP,problems);
+        if (typeName.startsWith(TIMESTAMP_TYPE_NAME)) {
+            result = findBuiltinType(DatatypeConstants.BuiltInNames.TIMESTAMP, problems);
         }
-        if ( result != null ) {
+        if (result != null) {
             return result;
         }
-        
-        return super.findType(jdbcType,typeName,length,precision,scale,problems);
+
+        return super.findType(jdbcType, typeName, length, precision, scale, problems);
     }
-    
+
     /**
-     * Overrides the method to find a type simply by name.  This method converts
-     * some Oracle-specific (non-numeric) types to standard names, and then
-     * simply delegates to the superclass.
-     * Find the datatype by name.
+     * Overrides the method to find a type simply by name. This method converts some Oracle-specific (non-numeric) types to
+     * standard names, and then simply delegates to the superclass. Find the datatype by name.
+     * 
      * @param jdbcTypeName the name of the JDBC (or DBMS) type
-     * @param problems the list if {@link IStatus} into which problems and warnings
-     * are to be placed; never null
-     * @return the datatype that is able to represent data with the supplied criteria, or
-     * null if no datatype could be found
+     * @param problems the list if {@link IStatus} into which problems and warnings are to be placed; never null
+     * @return the datatype that is able to represent data with the supplied criteria, or null if no datatype could be found
      * @see com.metamatrix.modeler.jdbc.relational.impl.RelationalModelProcessorImpl#findType(java.lang.String, java.util.List)
      */
     @Override
-    protected EObject findType(final String jdbcTypeName, final List problems) {
+    protected EObject findType( final String jdbcTypeName,
+                                final List problems ) {
         String standardName = jdbcTypeName;
         if (VARCHAR2_TYPE_NAME.equalsIgnoreCase(jdbcTypeName) || NVARCHAR2_TYPE_NAME.equalsIgnoreCase(jdbcTypeName)) {
             standardName = RelationalTypeMapping.SQL_TYPE_NAMES.VARCHAR;
         }
         return super.findType(standardName, problems);
     }
-    
+
     @Override
-    protected boolean isFixedLength(final int type,
-                                    final String typeName) {
+    protected boolean isFixedLength( final int type,
+                                     final String typeName ) {
         if (NVARCHAR2_TYPE_NAME.equalsIgnoreCase(typeName)) {
             return false;
         }
#P org.teiid.designer.jdbc.relational
Index: src/com/metamatrix/modeler/jdbc/relational/impl/RelationalModelProcessorImpl.java
===================================================================
--- src/com/metamatrix/modeler/jdbc/relational/impl/RelationalModelProcessorImpl.java	(revision 1029)
+++ src/com/metamatrix/modeler/jdbc/relational/impl/RelationalModelProcessorImpl.java	(working copy)
@@ -73,7 +73,6 @@
 import com.metamatrix.modeler.core.TransactionRunnable;
 import com.metamatrix.modeler.core.container.Container;
 import com.metamatrix.modeler.core.transaction.UnitOfWork;
-import com.metamatrix.modeler.core.types.DatatypeConstants;
 import com.metamatrix.modeler.core.types.DatatypeManager;
 import com.metamatrix.modeler.core.util.ModelContents;
 import com.metamatrix.modeler.core.util.ModelResourceContainerFactory;
@@ -1335,19 +1334,14 @@
         // If the type is NUMERIC and precision is non-zero, then look at the length of the column ...
         // (assume zero length means the length isn't known)
         EObject result = null;
-        if (precision != 0 && (jdbcType == Types.NUMERIC || jdbcType == Types.DECIMAL)) {
-            result = findType(precision, scale, problems);
-        }
-        if (result != null) {
-            return result;
-        }
 
         // If the type corresponds to a string ...
         // Defect 15386 - Removed the length > 1 check on the Types.CHAR JDBC type
         // The CHAR runtime type is now deprecated, and thus we import JDBC chars of
         // length 1 as strings
-        if ((jdbcType == Types.CHAR) || jdbcType == Types.VARCHAR || jdbcType == Types.LONGVARCHAR || jdbcType == Types.CLOB
-            || RelationalTypeMapping.SQL_TYPE_NAMES.NCHAR.equals(typeName)) {
+        if (jdbcType == Types.CHAR || jdbcType == Types.VARCHAR || jdbcType == Types.LONGVARCHAR || jdbcType == Types.NCHAR
+            || jdbcType == Types.NVARCHAR || RelationalTypeMapping.SQL_TYPE_NAMES.NCHAR.equals(typeName)
+            || RelationalTypeMapping.SQL_TYPE_NAMES.NVARCHAR.equals(typeName)) {
             result = findType(RelationalTypeMapping.SQL_TYPE_NAMES.VARCHAR, problems);
         }
         if (result != null) {
@@ -1369,53 +1363,6 @@
     }
 
     /**
-     * Find a (numeric) type by precision and scale
-     * 
-     * @param precision the precision of the type
-     * @param scale the scale of the type
-     * @param problems the list if {@link IStatus} into which problems and warnings are to be placed; never null
-     * @return the datatype that is able to represent data with the supplied criteria, or null if no datatype could be found
-     */
-    protected EObject findType( final int precision,
-                                final int scale,
-                                final List problems ) {
-        // If the type is NUMERIC and precision is non-zero, then look at the length of the column ...
-        // (assume zero length means the length isn't known)
-        EObject result = null;
-        if (scale <= 0) {
-            // The scale is 0 or negative (pads zeros at the end of the number).
-            int numDigits = precision - scale;
-
-            // Do this from the least to the greatest, so that we pick the smallest feasible type
-            // But note that because these are by number of digits, the smallest type is always
-            // one digit less than the number of significant digits. For example, the number 65536
-            // is five digits, and short can store that number. But 65537 cannot be stored as a Java
-            // short; therefore, we can only be certain that any 4 digit number can be represented as
-            // a Java short; not all 5 digit numbers can be.
-            if (numDigits <= 4) {
-                // The built-in datatype of xs:short has a runtime type of java.lang.Short
-                // Range of values for java.lang.Short is -32,768 (-2E+15) <= short <= +32,767 (2E+15 - 1)
-                result = findBuiltinType(DatatypeConstants.BuiltInNames.SHORT, problems);
-            } else if (numDigits <= 9) {
-                // The built-in datatype of xs:int has a runtime type of java.lang.Integer
-                // Range of values for java.lang.Integer is -2,147,483,648 (-2E+31) <= int <= +2,147,483,647 (2E+31 - 1)
-                result = findBuiltinType(DatatypeConstants.BuiltInNames.INT, problems);
-            } else if (numDigits <= 18) { // 2^64 = 1.84467E+19
-                // The built-in datatype of xs:long has a runtime type of java.lang.Long
-                // Range of values for java.lang.Long is (-2E+63) <= long <= (2E+63 - 1)
-                result = findBuiltinType(DatatypeConstants.BuiltInNames.LONG, problems);
-            } else {
-                // Range of values for java.lang.BigInteger is limitless
-                // The built-in datatypes of xs:biginteger or xs:integer have a runtime type of java.lang.BigInteger
-                result = findBuiltinType(DatatypeConstants.BuiltInNames.BIG_INTEGER, problems);
-            }
-        } else {
-            result = findBuiltinType(DatatypeConstants.BuiltInNames.BIG_DECIMAL, problems);
-        }
-        return result;
-    }
-
-    /**
      * Find the datatype by type code.
      * 
      * @param jdbcType the JDBC (or DBMS) type
Index: src/com/metamatrix/modeler/jdbc/relational/impl/custom/OracleModelProcessor.java
===================================================================
--- src/com/metamatrix/modeler/jdbc/relational/impl/custom/OracleModelProcessor.java	(revision 1029)
+++ src/com/metamatrix/modeler/jdbc/relational/impl/custom/OracleModelProcessor.java	(working copy)
@@ -31,7 +31,6 @@
     private static final String VARCHAR2_TYPE_NAME = "VARCHAR2"; //$NON-NLS-1$
     private static final String NVARCHAR2_TYPE_NAME = "NVARCHAR2"; //$NON-NLS-1$
     private static final String TIMESTAMP_TYPE_NAME = "TIMESTAMP("; //$NON-NLS-1$
-    private static final String NUMBER_TYPE_NAME = "NUMBER"; //$NON-NLS-1$
     private static final String REF_CURSOR = "REF CURSOR"; //$NON-NLS-1$
 
     /**
@@ -137,16 +136,6 @@
                                 final List problems ) {
 
         EObject result = null;
-        // If the type is NUMERIC and precision is non-zero, then look at the length of the column ...
-        // (assume zero length means the length isn't known)
-        if (precision != 0) {
-            if (NUMBER_TYPE_NAME.equalsIgnoreCase(typeName) || REF_CURSOR.equalsIgnoreCase(typeName)) {
-                result = findType(precision, scale, problems);
-            }
-        }
-        if (result != null) {
-            return result;
-        }
 
         // Oracle 9i introduced the "timestamp" type name (with type=1111, or OTHER)
         if (typeName.startsWith(TIMESTAMP_TYPE_NAME)) {
@@ -271,8 +260,8 @@
                                           final boolean forced ) {
 
         String nis = super.computeNameInSource(object, name, node, context, forced);
-        if( nis != null ) {
-        	nis = nis.replace('@', '.');
+        if (nis != null) {
+            nis = nis.replace('@', '.');
         }
         return nis;
     }
