Package org.teiid.translator.simpledb
Class SimpleDBMetadataProcessor
- java.lang.Object
-
- org.teiid.translator.simpledb.SimpleDBMetadataProcessor
-
- All Implemented Interfaces:
MetadataProcessor<SimpleDBConnection>
public class SimpleDBMetadataProcessor extends Object implements MetadataProcessor<SimpleDBConnection>
-
-
Field Summary
Fields Modifier and Type Field Description static String
ITEM_NAME
-
Fields inherited from interface org.teiid.translator.MetadataProcessor
FQN, SOURCE_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SimpleDBMetadataProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
getName(AbstractMetadataRecord record)
static String
getQuotedName(AbstractMetadataRecord record)
static boolean
isItemName(String name)
static boolean
isItemName(Column column)
void
process(MetadataFactory metadataFactory, SimpleDBConnection connection)
As SimpleDB does not provide any way to obtain all attribute names for given domain (one can query only attribute names for single item) and querrying all items in domain to get complete set of attribute names would be very slow and resource consuming, this approach has been selected: For each domain only first item is queried for attribute names and metadata are created using this information.
-
-
-
Field Detail
-
ITEM_NAME
public static final String ITEM_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
process
public void process(MetadataFactory metadataFactory, SimpleDBConnection connection) throws TranslatorException
As SimpleDB does not provide any way to obtain all attribute names for given domain (one can query only attribute names for single item) and querrying all items in domain to get complete set of attribute names would be very slow and resource consuming, this approach has been selected: For each domain only first item is queried for attribute names and metadata are created using this information. Thus first item in domain should have as much attributes as possible.- Specified by:
process
in interfaceMetadataProcessor<SimpleDBConnection>
- Throws:
TranslatorException
- See Also:
MetadataProcessor.process(org.teiid.metadata.MetadataFactory, java.lang.Object)
-
getName
public static String getName(AbstractMetadataRecord record)
-
getQuotedName
public static String getQuotedName(AbstractMetadataRecord record)
-
isItemName
public static boolean isItemName(Column column)
-
isItemName
public static boolean isItemName(String name)
-
-