use of org.apache.derby.catalog.types.BaseTypeIdImpl in project derby by apache.
the class DataDictionaryImpl method getAliasDescriptorForUDT.
/**
* Get the alias descriptor for an ANSI UDT.
*
* @param tc The transaction to use: if null, use the compilation transaction
* @param dtd The UDT's type descriptor
*
* @return The UDT's alias descriptor if it is an ANSI UDT; null otherwise.
*/
public AliasDescriptor getAliasDescriptorForUDT(TransactionController tc, DataTypeDescriptor dtd) throws StandardException {
if (tc == null) {
tc = getTransactionCompile();
}
if (dtd == null) {
return null;
}
BaseTypeIdImpl btii = dtd.getTypeId().getBaseTypeId();
if (!btii.isAnsiUDT()) {
return null;
}
SchemaDescriptor sd = getSchemaDescriptor(btii.getSchemaName(), tc, true);
AliasDescriptor ad = getAliasDescriptor(sd.getUUID().toString(), btii.getUnqualifiedName(), AliasInfo.ALIAS_NAME_SPACE_UDT_AS_CHAR);
return ad;
}
Aggregations