private SchemaDescriptor getSchemaDescriptorBody(
UUID schemaId,
int isolationLevel,
TransactionController tc) throws StandardException
{
SchemaDescriptor sd = null;
if ( tc == null )
{
tc = getTransactionCompile();
}
/*
** Check for APP and SYS schemas before going any
** further.
*/
if (schemaId != null)
{
if (getSystemSchemaDescriptor().getUUID().equals(schemaId))
{
return getSystemSchemaDescriptor();
}
else if (getSysIBMSchemaDescriptor().getUUID().equals(schemaId))
{
return getSysIBMSchemaDescriptor();
}
}
/*
** If we aren't booting, lets see if we already
** have the descriptor. If we are in the middle
** of booting we cannot get the LanguageConnectionContext.
*/
if (!booting)
{
LanguageConnectionContext lcc = getLCC();
if (lcc != null)
{
sd = lcc.getDefaultSchema();
if ((sd != null) &&
((schemaId == null) ||
schemaId.equals(sd.getUUID())))
{
return sd;
}
}
}