use of org.apache.derby.catalog.DependableFinder in project derby by apache.
the class SYSDEPENDSRowFactory method buildDescriptor.
// /////////////////////////////////////////////////////////////////////////
//
// ABSTRACT METHODS TO BE IMPLEMENTED BY CHILDREN OF CatalogRowFactory
//
// /////////////////////////////////////////////////////////////////////////
/**
* Make a ConstraintDescriptor out of a SYSDEPENDS row
*
* @param row a SYSDEPENDSS row
* @param parentTupleDescriptor Null for this kind of descriptor.
* @param dd dataDictionary
*
* @exception StandardException thrown on failure
*/
public TupleDescriptor buildDescriptor(ExecRow row, TupleDescriptor parentTupleDescriptor, DataDictionary dd) throws StandardException {
DependencyDescriptor dependencyDesc = null;
if (SanityManager.DEBUG) {
SanityManager.ASSERT(row.nColumns() == SYSDEPENDS_COLUMN_COUNT, "Wrong number of columns for a SYSDEPENDS row");
}
DataValueDescriptor col;
String dependentIDstring;
UUID dependentUUID;
DependableFinder dependentBloodhound;
String providerIDstring;
UUID providerUUID;
DependableFinder providerBloodhound;
/* 1st column is DEPENDENTID (UUID - char(36)) */
col = row.getColumn(SYSDEPENDS_DEPENDENTID);
dependentIDstring = col.getString();
dependentUUID = getUUIDFactory().recreateUUID(dependentIDstring);
/* 2nd column is DEPENDENTTYPE */
col = row.getColumn(SYSDEPENDS_DEPENDENTTYPE);
dependentBloodhound = (DependableFinder) col.getObject();
/* 3rd column is PROVIDERID (UUID - char(36)) */
col = row.getColumn(SYSDEPENDS_PROVIDERID);
providerIDstring = col.getString();
providerUUID = getUUIDFactory().recreateUUID(providerIDstring);
/* 4th column is PROVIDERTYPE */
col = row.getColumn(SYSDEPENDS_PROVIDERTYPE);
providerBloodhound = (DependableFinder) col.getObject();
/* now build and return the descriptor */
return new DependencyDescriptor(dependentUUID, dependentBloodhound, providerUUID, providerBloodhound);
}
Aggregations