boolean adding
)
throws StandardException
{
RoutineAliasInfo routineInfo = null;
AggregateAliasInfo aggInfo = null;
// nothing to do if this is not a routine
switch ( ad.getAliasType() )
{
case AliasInfo.ALIAS_TYPE_AGGREGATE_AS_CHAR:
aggInfo = (AggregateAliasInfo) ad.getAliasInfo();
break;
case AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR:
case AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR:
routineInfo = (RoutineAliasInfo) ad.getAliasInfo();
break;
default: return;
}
TransactionController tc = lcc.getTransactionExecute();
HashMap<String,AliasDescriptor> addUdtMap =
new HashMap<String,AliasDescriptor>();
HashMap<String,AliasDescriptor> dropUdtMap =
new HashMap<String,AliasDescriptor>();
HashMap<String,AliasDescriptor> udtMap =
adding ? addUdtMap : dropUdtMap;
TypeDescriptor rawReturnType = aggInfo != null ?
aggInfo.getReturnType() : routineInfo.getReturnType();
if ( rawReturnType != null )
{
AliasDescriptor returnTypeAD = dd.getAliasDescriptorForUDT
( tc, DataTypeDescriptor.getType( rawReturnType ) );
if ( returnTypeAD != null ) { udtMap.put( returnTypeAD.getObjectID().toString(), returnTypeAD ); }
}
// table functions can have udt columns. track those dependencies.
if ( (rawReturnType != null) && rawReturnType.isRowMultiSet() )
{
TypeDescriptor[] columnTypes = rawReturnType.getRowTypes();
int columnCount = columnTypes.length;
for ( int i = 0; i < columnCount; i++ )
{
AliasDescriptor columnTypeAD = dd.getAliasDescriptorForUDT
( tc, DataTypeDescriptor.getType( columnTypes[ i ] ) );
if ( columnTypeAD != null ) { udtMap.put( columnTypeAD.getObjectID().toString(), columnTypeAD ); }
}
}
TypeDescriptor[] paramTypes = aggInfo != null ?
new TypeDescriptor[] { aggInfo.getForType() } : routineInfo.getParameterTypes();
if ( paramTypes != null )
{
int paramCount = paramTypes.length;
for ( int i = 0; i < paramCount; i++ )
{