Author: shawkins
Date: 2009-11-16 10:33:42 -0500 (Mon, 16 Nov 2009)
New Revision: 1551
Modified:
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/MetadataFactory.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
Log:
TEIID-145 TEIID-869 defaulting to allowing double quoted identifiers (ansi standard). and
further cleaning up metadata
Modified:
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/MetadataFactory.java
===================================================================
---
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/MetadataFactory.java 2009-11-16
02:17:12 UTC (rev 1550)
+++
trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/MetadataFactory.java 2009-11-16
15:33:42 UTC (rev 1551)
@@ -78,6 +78,7 @@
private void setValuesUsingParent(String name,
AbstractMetadataRecord parent, AbstractMetadataRecord child, String recordType) throws
ConnectorException {
child.setFullName(parent.getFullName() + AbstractMetadataRecord.NAME_DELIM_CHAR +
name);
+ child.setName(name);
if (!uniqueNames.add(recordType + "/" + child.getFullName())) {
//$NON-NLS-1$
throw new
ConnectorException(DataPlugin.Util.getString("MetadataFactory.duplicate_name",
child)); //$NON-NLS-1$
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2009-11-16
02:17:12 UTC (rev 1550)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2009-11-16
15:33:42 UTC (rev 1551)
@@ -1011,6 +1011,20 @@
final String parentObjectID) {
record.setUUID(getObjectValue(objectID));
+ if (fullName != null) {
+ int index = fullName.indexOf(IndexConstants.NAME_DELIM_CHAR);
+ String name = fullName;
+ if (index > 0) {
+ name = fullName.substring(index + 1);
+ }
+ if (record instanceof ColumnRecordImpl) {
+ index = fullName.indexOf(IndexConstants.NAME_DELIM_CHAR);
+ if (index > 0) {
+ name = fullName.substring(index + 1);
+ }
+ }
+ record.setName(name);
+ }
record.setFullName(fullName);
record.setNameInSource(getObjectValue(nameInSource));
}
Show replies by date