if ( pDatabaseName == null ) {
pDatabaseName = getDatabaseName();
}
String[] descriptorNames = getWrappedRepository().getItemDescriptorNames();
OutputSQLContext sqlContext = new OutputSQLContext(pOut);
GSAItemDescriptor itemDescriptors[];
//DatabaseTableInfo dti = getDatabaseTableInfo(pDatabaseName);
int i, length = descriptorNames.length;
itemDescriptors = new GSAItemDescriptor[length];
for ( i = 0; i < length; i++ ) {
itemDescriptors[i] = (GSAItemDescriptor) getWrappedRepository().getItemDescriptor(
descriptorNames[i]
);
}
String create = null;
String index = null;
HashSet<String> tableNames = new HashSet<String>();
for ( i = 0; i < length; i++ ) {
GSAItemDescriptor desc = itemDescriptors[i];
Table[] tables = desc.getTables();
if ( tables != null ) {
for ( Table t : tables ) {
if ( !t.isInherited() && !tableNames.contains(t.getName()) ) {
sqlContext.clear();
create = t.generateSQL(sqlContext, pDatabaseName);
// get rid of any possible CREATE INDEX statements and store those
// in their own Vector of statements...
index = extractIndexStatement(create);
create = removeIndexStatements(create);