databaseType = getKnownDatabaseType(objectTypename);
}
if (!typeStack.empty()) {
DatabaseType top = typeStack.peek();
if (top.isComplexDatabaseType()) {
ComplexDatabaseType cdt = (ComplexDatabaseType)top;
if (cdt.isCollection()) {
PLSQLCollection coll = (PLSQLCollection)cdt;
if (coll.getNestedType() == null) {
coll.setNestedType(databaseType);
}
}
else if (cdt.isRecord()) {
PLSQLrecord rec = (PLSQLrecord)cdt;
List<PLSQLargument> fields = rec.getFields();
PLSQLargument arg = fields.get(fields.size() - 1);
if (arg.databaseType == null) {
arg.databaseType = databaseType;
}
}
else if (cdt.isJDBCType()) {
if (typeStack.size() > 1) {
typeStack.pop();
DatabaseType topMinus1 = typeStack.peek();
if (topMinus1.isComplexDatabaseType()) {
ComplexDatabaseType cdtMinus1 = (ComplexDatabaseType)topMinus1;
if (cdtMinus1.isRecord()) {
PLSQLrecord rec = (PLSQLrecord)cdtMinus1;
List<PLSQLargument> fields = rec.getFields();
PLSQLargument arg = fields.get(fields.size() - 1);
if (arg.databaseType == null) {
arg.databaseType = cdt;